Package com.aspectran.shell.console
Class DefaultShellConsole
java.lang.Object
com.aspectran.shell.console.AbstractShellConsole
com.aspectran.shell.console.DefaultShellConsole
- All Implemented Interfaces:
ShellConsole
Console I/O implementation that supports System Console.
Created: 2017. 3. 4.
-
Field Summary
Fields inherited from interface com.aspectran.shell.console.ShellConsole
COMMENT_DELIMITER, COMMENT_PROMPT, DEFAULT_PROMPT, MASK_CHAR, MULTILINE_DELIMITER, MULTILINE_PROMPT
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
void
void
boolean
hasStyle()
void
boolean
readLine
(PromptStringBuilder promptStringBuilder) readPassword
(PromptStringBuilder promptStringBuilder) protected String
readRawCommandLine
(String prompt) protected String
readRawLine
(String prompt) void
void
void
resetStyle
(String... styles) void
void
setCommandHistoryFile
(String historyFile) void
void
void
void
void
void
writeAbove
(String str) void
writeError
(String str) void
writeError
(String format, Object... args) void
void
void
Methods inherited from class com.aspectran.shell.console.AbstractShellConsole
confirmQuit, confirmRestart, getCommandPrompt, getConsoleCommander, getDangerStyle, getInfoStyle, getPrimaryStyle, getSecondaryStyle, getSuccessStyle, getWarningStyle, getWorkingDir, readLine, readMultiCommandLine, readMultiLine, readPassword, setCommandPrompt, setConsoleCommander, setShellStyleConfig, setWorkingDir
-
Constructor Details
-
DefaultShellConsole
public DefaultShellConsole() -
DefaultShellConsole
-
-
Method Details
-
getEncoding
- Specified by:
getEncoding
in interfaceShellConsole
- Overrides:
getEncoding
in classAbstractShellConsole
-
getOutput
-
getWriter
-
setCommandHistoryFile
-
getCommandHistory
-
clearCommandHistory
public void clearCommandHistory() -
readCommandLine
-
newPromptStringBuilder
-
readLine
-
readPassword
-
readRawCommandLine
- Specified by:
readRawCommandLine
in classAbstractShellConsole
-
readRawLine
- Specified by:
readRawLine
in classAbstractShellConsole
-
write
-
write
-
writeLine
-
writeLine
-
writeLine
public void writeLine() -
writeError
-
writeError
-
writeAbove
-
clearScreen
public void clearScreen() -
clearLine
public void clearLine() -
redrawLine
public void redrawLine() -
isReading
public boolean isReading() -
hasStyle
public boolean hasStyle() -
setStyle
-
resetStyle
public void resetStyle() -
resetStyle
-
secondaryStyle
public void secondaryStyle() -
successStyle
public void successStyle() -
dangerStyle
public void dangerStyle() -
warningStyle
public void warningStyle() -
infoStyle
public void infoStyle()
-