Class JLineShellConsole
java.lang.Object
com.aspectran.shell.console.AbstractShellConsole
com.aspectran.shell.jline.console.JLineShellConsole
- All Implemented Interfaces:
ShellConsole
Console I/O implementation that supports JLine.
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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
void
void
protected JLineTerminal.Style
protected JLineTerminal.Style
getStyle()
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
setCommandPrompt
(String commandPrompt) protected void
setStyle
(JLineTerminal.Style style) 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, getEncoding, getInfoStyle, getPrimaryStyle, getSecondaryStyle, getSuccessStyle, getWarningStyle, getWorkingDir, readLine, readMultiCommandLine, readMultiLine, readPassword, setConsoleCommander, setShellStyleConfig, setWorkingDir
-
Constructor Details
-
JLineShellConsole
- Throws:
IOException
-
JLineShellConsole
- Throws:
IOException
-
-
Method Details
-
getJlineTerminal
-
getOutput
-
getWriter
-
setCommandHistoryFile
-
getCommandHistory
-
clearCommandHistory
public void clearCommandHistory() -
setCommandPrompt
- Specified by:
setCommandPrompt
in interfaceShellConsole
- Overrides:
setCommandPrompt
in classAbstractShellConsole
-
newPromptStringBuilder
-
readCommandLine
-
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() -
getBaseStyle
-
hasStyle
public boolean hasStyle() -
getStyle
-
setStyle
-
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()
-