|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | PROPERTY | CONSTR | METHOD | DETAIL: FIELD | PROPERTY | CONSTR | METHOD |
java.lang.Objectorg.codehaus.groovy.tools.shell.Shell
org.codehaus.groovy.tools.shell.Groovysh
class Groovysh extends Shell
An interactive shell for evaluating Groovy code from the command-line (aka. groovysh).
Field Summary | |
---|---|
static java.lang.String |
AUTOINDENT_PREFERENCE_KEY
|
Fields inherited from class Shell | |
---|---|
log |
Property Summary | |
---|---|
BufferManager |
buffers
|
Closure |
defaultErrorHook
|
Closure |
defaultResultHook
|
Closure |
errorHook
|
java.lang.String |
evictedLine
|
jline.console.history.FileHistory |
history
|
boolean |
historyFull
|
java.util.List |
imports
|
int |
indentSize
|
Interpreter |
interp
|
PackageHelper |
packageHelper
|
Parser |
parser
|
Closure |
resultHook
|
InteractiveShellRunner |
runner
|
Constructor Summary | |
Groovysh(java.lang.ClassLoader classLoader, Binding binding, IO io, Closure registrar)
|
|
Groovysh(java.lang.ClassLoader classLoader, Binding binding, IO io)
|
|
Groovysh(Binding binding, IO io)
|
|
Groovysh(IO io)
|
|
Groovysh()
|
Method Summary | |
---|---|
void
|
displayBuffer(java.util.List buffer)
Display the given buffer. |
java.lang.Object
|
execute(java.lang.String line)
Execute a single line, where the line may be a command or Groovy code (complete or incomplete). |
protected java.lang.Object
|
executeCommand(java.lang.String line)
|
java.lang.String
|
getIndentPrefix()
Calculate probably desired indentation based on parenthesis balance and last char, as well as what the user used last as indentation. |
java.io.File
|
getUserStateDirectory()
|
java.lang.String
|
renderPrompt()
|
int
|
run(java.lang.String[] args)
|
int
|
run(java.lang.String commandLine)
|
Methods inherited from class Shell | |
---|---|
execute, findCommand, isExecutable, leftShift, leftShift, parseLine, register |
Field Detail |
---|
public static final java.lang.String AUTOINDENT_PREFERENCE_KEY
Property Detail |
---|
final BufferManager buffers
final Closure defaultErrorHook
final Closure defaultResultHook
Closure errorHook
java.lang.String evictedLine
jline.console.history.FileHistory history
boolean historyFull
final java.util.List imports
int indentSize
final Interpreter interp
PackageHelper packageHelper
final Parser parser
Closure resultHook
InteractiveShellRunner runner
Constructor Detail |
---|
Groovysh(java.lang.ClassLoader classLoader, Binding binding, IO io, Closure registrar)
Groovysh(java.lang.ClassLoader classLoader, Binding binding, IO io)
Groovysh(Binding binding, IO io)
Groovysh(IO io)
Groovysh()
Method Detail |
---|
void displayBuffer(java.util.List buffer)
java.lang.Object execute(java.lang.String line)
protected java.lang.Object executeCommand(java.lang.String line)
java.lang.String getIndentPrefix()
java.io.File getUserStateDirectory()
java.lang.String renderPrompt()
int run(java.lang.String[] args)
int run(java.lang.String commandLine)
Groovy Documentation