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 classstatic interfacestatic classstatic enum -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringprotected final GroovyEngine.EngineClassLoaderstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringprotected Bindingstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddeserialize(String value, String formatStr) org.jline.reader.Completerprotected org.jline.builtins.SyntaxHighlightergetTypes()protected <T> TgroovyOption(String option, T defval) protected static <T> TgroovyOption(Map<String, Object> options, String option, T defval) booleanhasVariable(String name) voidvoidvoidpurgeClassCache(String regex) voidbooleanrefresh()voidremoveImport(String name) voidremoveMethod(String name) voidremoveType(String name) voidremoveVariable(String name) voidreset()org.jline.console.CmdDescscriptDescription(org.jline.console.CmdLine line) voidsetObjectCloner(GroovyEngine.Cloner objectCloner) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:
getScriptCompleterin interfaceorg.jline.console.ScriptEngine
-
hasVariable
- Specified by:
hasVariablein interfaceorg.jline.console.ScriptEngine
-
put
- Specified by:
putin interfaceorg.jline.console.ScriptEngine
-
get
- Specified by:
getin interfaceorg.jline.console.ScriptEngine
-
find
- Specified by:
findin interfaceorg.jline.console.ScriptEngine
-
getSerializationFormats
- Specified by:
getSerializationFormatsin interfaceorg.jline.console.ScriptEngine
-
getDeserializationFormats
- Specified by:
getDeserializationFormatsin interfaceorg.jline.console.ScriptEngine
-
deserialize
- Specified by:
deserializein interfaceorg.jline.console.ScriptEngine
-
persist
- Specified by:
persistin interfaceorg.jline.console.ScriptEngine
-
persist
- Specified by:
persistin interfaceorg.jline.console.ScriptEngine
-
execute
- Specified by:
executein interfaceorg.jline.console.ScriptEngine- Throws:
Exception
-
getBuffer
-
execute
- Specified by:
executein interfaceorg.jline.console.ScriptEngine- Throws:
Exception
-
execute
- Specified by:
executein interfaceorg.jline.console.ScriptEngine
-
getEngineName
- Specified by:
getEngineNamein interfaceorg.jline.console.ScriptEngine
-
getExtensions
- Specified by:
getExtensionsin interfaceorg.jline.console.ScriptEngine
-
reset
public void reset() -
removeMethod
-
removeImport
-
removeType
-
removeVariable
-
del
- Specified by:
delin interfaceorg.jline.console.ScriptEngine
-
toJson
- Specified by:
toJsonin interfaceorg.jline.console.ScriptEngine
-
toString
- Specified by:
toStringin interfaceorg.jline.console.ScriptEngine
-
toMap
- Specified by:
toMapin 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
-