Package org.apache.groovy.groovysh.jline
Class GroovyEngine
java.lang.Object
org.apache.groovy.groovysh.jline.GroovyEngine
- All Implemented Interfaces:
org.jline.console.ScriptEngine
Implements Groovy ScriptEngine.
You must be very careful when using GroovyEngine in a multithreaded environment. The Binding instance is not
thread safe, and it is shared by all scripts.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static class
static interface
static class
static enum
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
static final String
protected final GroovyEngine.EngineClassLoader
static final String
static final String
static final String
static final String
static final String
static final String
static final String
protected Binding
static final String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
deserialize
(String value, String formatStr) org.jline.reader.Completer
protected org.jline.builtins.SyntaxHighlighter
getTypes()
protected <T> T
groovyOption
(String option, T defval) protected static <T> T
groovyOption
(Map<String, Object> options, String option, T defval) boolean
hasVariable
(String name) void
void
void
purgeClassCache
(String regex) void
boolean
refresh()
void
removeImport
(String name) void
removeMethod
(String name) void
removeType
(String name) void
removeVariable
(String name) void
reset()
org.jline.console.CmdDesc
scriptDescription
(org.jline.console.CmdLine line) void
setObjectCloner
(GroovyEngine.Cloner objectCloner) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.jline.console.ScriptEngine
deserialize, execute, execute, execute, find
-
Field Details
-
CANONICAL_NAMES
- See Also:
-
NANORC_SYNTAX
- See Also:
-
NANORC_VALUE
- See Also:
-
GROOVY_COLORS
- See Also:
-
NO_SYNTAX_CHECK
- See Also:
-
RESTRICTED_COMPLETION
- See Also:
-
ALL_FIELDS_COMPLETION
- See Also:
-
ALL_METHODS_COMPLETION
- See Also:
-
ALL_CONSTRUCTORS_COMPLETION
- See Also:
-
ALL_CLASSES_COMPLETION
- See Also:
-
IDENTIFIERS_COMPLETION
- See Also:
-
META_METHODS_COMPLETION
- See Also:
-
SYNTHETIC_METHODS_COMPLETION
- See Also:
-
classLoader
-
-
Constructor Details
-
GroovyEngine
public GroovyEngine()
-
-
Method Details
-
getTypes
-
getVariables
-
getMethods
-
getMethodNames
-
getImports
-
getScriptCompleter
public org.jline.reader.Completer getScriptCompleter()- Specified by:
getScriptCompleter
in interfaceorg.jline.console.ScriptEngine
-
hasVariable
- Specified by:
hasVariable
in interfaceorg.jline.console.ScriptEngine
-
put
- Specified by:
put
in interfaceorg.jline.console.ScriptEngine
-
get
- Specified by:
get
in interfaceorg.jline.console.ScriptEngine
-
find
- Specified by:
find
in interfaceorg.jline.console.ScriptEngine
-
getSerializationFormats
- Specified by:
getSerializationFormats
in interfaceorg.jline.console.ScriptEngine
-
getDeserializationFormats
- Specified by:
getDeserializationFormats
in interfaceorg.jline.console.ScriptEngine
-
deserialize
- Specified by:
deserialize
in interfaceorg.jline.console.ScriptEngine
-
persist
- Specified by:
persist
in interfaceorg.jline.console.ScriptEngine
-
persist
- Specified by:
persist
in interfaceorg.jline.console.ScriptEngine
-
execute
- Specified by:
execute
in interfaceorg.jline.console.ScriptEngine
- Throws:
Exception
-
getBuffer
-
execute
- Specified by:
execute
in interfaceorg.jline.console.ScriptEngine
- Throws:
Exception
-
execute
- Specified by:
execute
in interfaceorg.jline.console.ScriptEngine
-
getEngineName
- Specified by:
getEngineName
in interfaceorg.jline.console.ScriptEngine
-
getExtensions
- Specified by:
getExtensions
in interfaceorg.jline.console.ScriptEngine
-
reset
public void reset() -
removeMethod
-
removeImport
-
removeType
-
removeVariable
-
del
- Specified by:
del
in interfaceorg.jline.console.ScriptEngine
-
toJson
- Specified by:
toJson
in interfaceorg.jline.console.ScriptEngine
-
toString
- Specified by:
toString
in interfaceorg.jline.console.ScriptEngine
-
toMap
- Specified by:
toMap
in interfaceorg.jline.console.ScriptEngine
-
setObjectCloner
-
getObjectCloner
-
scriptDescription
public org.jline.console.CmdDesc scriptDescription(org.jline.console.CmdLine line) -
groovyOptions
-
groovyOption
-
groovyOption
-
refresh
public boolean refresh() -
getSyntaxHighlighter
protected org.jline.builtins.SyntaxHighlighter getSyntaxHighlighter() -
purgeClassCache
-