Console
public class JLineConsole extends PlainConsole
Modifier and Type | Field | Description |
---|---|---|
jline.console.ConsoleReader |
reader |
Main interface to JLine.
|
encoding, encodingCharset
Constructor | Description |
---|---|
JLineConsole(java.lang.String encoding) |
Construct an instance of the console class specifying the character encoding.
|
Modifier and Type | Method | Description |
---|---|---|
jline.console.ConsoleReader |
getReader() |
|
PyObject |
getStartupHook() |
|
void |
install() |
Complete initialization and (optionally) install a stream object with line-editing as the
replacement for
System.in . |
void |
setStartupHook(PyObject hook) |
Sets the startup hook (called prior to each readline)
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getEncoding, getEncodingCharset, uninstall
public JLineConsole(java.lang.String encoding)
Most of the initialisation is deferred to the install()
method so that any prior
console can uninstall itself before we change system console settings and
System.in
.
encoding
- name of a supported encoding or null
for
Charset.defaultCharset()
public void install()
System.in
.
This implementation overrides that by setting System.in
to a
FilterInputStream
object that wraps JLine, and System.out
with a layer that buffers incomplete lines for use as the console prompt.
install
in interface Console
install
in class PlainConsole
public jline.console.ConsoleReader getReader()
public PyObject getStartupHook()
public void setStartupHook(PyObject hook)