public interface Shell
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ABORT
Abort string returned when user presses ^C.
|
Modifier and Type | Method and Description |
---|---|
void |
error(java.lang.Object obj)
Display error.
|
void |
init(ScriptEngine engine)
Initialize the shell.
|
void |
input(java.lang.Object obj)
Display input line.
|
boolean |
isDumb()
Check if terminal supports ANSI control sequences.
|
void |
notify(java.lang.Object obj)
Display unsolicited notification.
|
void |
println(java.lang.Object obj)
Display script output.
|
void |
prompt(java.lang.Object obj)
Prompt user for input.
|
java.lang.String |
readLine(java.lang.String prompt1,
java.lang.String prompt2,
java.lang.String line)
Read a line from the shell.
|
void |
shutdown()
Shutdown the shell.
|
static final java.lang.String ABORT
void init(ScriptEngine engine)
engine
- script engine to use for sentence completion check,
or null to disable.void prompt(java.lang.Object obj)
void input(java.lang.Object obj)
void println(java.lang.Object obj)
void notify(java.lang.Object obj)
void error(java.lang.Object obj)
java.lang.String readLine(java.lang.String prompt1, java.lang.String prompt2, java.lang.String line)
prompt1
- prompt to display on first line, null if none.prompt2
- prompt to display on continuation line, null if none.line
- input text to edit, null if blank.boolean isDumb()
void shutdown()