콘솔
public
class
Console
extends Object
java.lang.Object | |
↳ | com.android.tradefed.command.Console |
사용자에게 상호작용할 인터페이스를 제공하는 기본 TradeFederation 콘솔
현재 다음과 같은 작업을 지원합니다.
- 테스트할 명령어 추가
- 기기 및 기기 상태 목록
- 진행 중인 호출 목록
- 큐에 있는 명령어 나열
- 호출 로그를 파일/stdout에 덤프
- 종료
요약
중첩된 클래스 | |
---|---|
class |
Console.ArgRunnable<T>
인수를 사용할 수 있는 |
class |
Console.CaptureList
|
필드 | |
---|---|
protected
static
final
String |
DEBUG_PATTERN
|
protected
static
final
String |
DUMP_PATTERN
|
protected
static
final
String |
EXIT_PATTERN
|
protected
static
final
String |
HELP_PATTERN
|
protected
static
final
String |
INVOC_PATTERN
|
protected
static
final
String |
LINE_SEPARATOR
|
protected
static
final
String |
LIST_COMMANDS_PATTERN
|
protected
static
final
String |
LIST_PATTERN
|
protected
static
final
String |
REMOVE_PATTERN
|
protected
static
final
String |
RUN_PATTERN
|
protected
static
final
String |
SET_PATTERN
|
protected
static
final
String |
VERSION_PATTERN
|
protected
LineReader |
mConsoleReader
|
protected
IKeyStoreFactory |
mKeyStoreFactory
|
protected
ICommandScheduler |
mScheduler
|
보호된 생성자 | |
---|---|
Console()
|
공개 메서드 | |
---|---|
static
void
|
main(String[] mainArgs)
|
void
|
run()
콘솔을 실행하는 기본 메서드입니다. |
void
|
setArgs(
콘솔 시작 인수를 설정합니다. |
static
void
|
startConsole(Console console, String[] args)
주어진 args를 사용하여 주어진 Tradefed 콘솔을 시작합니다. |
보호된 메서드 | |
---|---|
String
|
getConsolePrompt()
|
String
|
getGenericHelpString(
표시할 일반 도움말 문자열을 반환합니다. |
static
LineReader
|
getReader()
새 LineReader를 반환하거나 IOException이 발생하면 |
void
|
printLine(String output)
콘솔에 텍스트 한 줄 표시 |
void
|
printLine(String output, PrintStream pw)
Printwriter에 선을 출력합니다. |
void
|
setCustomCommands(RegexTrie<Runnable> trie,
서브클래스가 콘솔에서 사용할 수 있는 명령어를 변경하는 데 사용할 수 있는 맞춤설정 지점입니다. |
필드
DEBUG_PATTERN
protected static final String DEBUG_PATTERN
DUMP_PATTERN
protected static final String DUMP_PATTERN
EXIT_PATTERN
protected static final String EXIT_PATTERN
HELP_PATTERN
protected static final String HELP_PATTERN
INVOC_PATTERN
protected static final String INVOC_PATTERN
LINE_SEPARATOR
protected static final String LINE_SEPARATOR
LIST_COMMANDS_PATTERN
protected static final String LIST_COMMANDS_PATTERN
LIST_PATTERN
protected static final String LIST_PATTERN
REMOVE_PATTERN
protected static final String REMOVE_PATTERN
RUN_PATTERN
protected static final String RUN_PATTERN
SET_PATTERN
protected static final String SET_PATTERN
VERSION_PATTERN
protected static final String VERSION_PATTERN
mConsoleReader
protected LineReader mConsoleReader
mKeyStoreFactory
protected IKeyStoreFactory mKeyStoreFactory
보호된 생성자
콘솔
protected Console ()
공개 메서드
기본
public static void main (String[] mainArgs)
매개변수 | |
---|---|
mainArgs |
String |
생성 값 | |
---|---|
ConfigurationException |
실행
public void run ()
콘솔을 실행하는 기본 메서드입니다. 종료 명령어가 실행될 때까지 계속 실행됩니다.
setArgs
public void setArgs (mainArgs)
콘솔 시작 인수를 설정합니다.
매개변수 | |
---|---|
mainArgs |
: 인수
|
startConsole
public static void startConsole (Console console, String[] args)
주어진 args를 사용하여 주어진 Tradefed 콘솔을 시작합니다.
매개변수 | |
---|---|
console |
Console : 시작할 Console 입니다. |
args |
String : 명령줄 인수
|
생성 값 | |
---|---|
ConfigurationException |
보호된 메서드
getGenericHelpString
protected String getGenericHelpString (genericHelp)
표시할 일반 도움말 문자열을 반환합니다.
매개변수 | |
---|---|
genericHelp |
: 집계할 일반 도움말을 나타내는 String 목록입니다.
|
반환 값 | |
---|---|
String |
getReader
protected static LineReader getReader ()
새 LineReader를 반환하거나 IOException이 발생하면 null
를 반환합니다. 이 함수는 상위 클래스 생성자 전에 실행할 수 있도록 정적 함수여야 합니다.
반환 값 | |
---|---|
LineReader |
printLine
protected void printLine (String output)
콘솔에 텍스트 한 줄 표시
printLine
protected void printLine (String output, PrintStream pw)
Printwriter에 선을 출력합니다.
매개변수 | |
---|---|
pw |
PrintStream |
setCustomCommands
protected void setCustomCommands (RegexTrie<Runnable> trie,genericHelp, commandHelp)
서브클래스가 콘솔에서 사용할 수 있는 명령어를 변경하는 데 사용할 수 있는 맞춤설정 지점입니다.
구현은 genericHelp
및 commandHelp
변수를 수정하여 추가, 수정 또는 삭제한 기능을 문서화해야 합니다.
매개변수 | |
---|---|
trie |
RegexTrie : 명령어를 추가할 RegexTrie 입니다. |
genericHelp |
: 사용자가 인수 없이 'help' 명령어를 실행할 때 출력할 줄의 ERROR(/List) 입니다. |
commandHelp |
: 추가되었을 수 있는 새 명령어에 관한 문서가 포함된 ERROR(/Map) 입니다. 키는 RegexTrie 의 키로 사용할 정규 표현식입니다. 값은 해당 명령어에 대해 출력할 도움말 텍스트가 포함된 문자열이어야 합니다.
|