Package com.randomnoun.common.jessop
Class JessopScriptEngine
java.lang.Object
javax.script.AbstractScriptEngine
com.randomnoun.common.jessop.JessopScriptEngine
- All Implemented Interfaces:
Compilable
,ScriptEngine
The jessop ScriptEngine class.
- Author:
- knoxg
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Reserved key for a named value that sets the initial bindings converter.static final String
Reserved key for a named value that controls whether the target script is compiled (providing the target engine allows it).static String
Default value for the JESSOP_EXCEPTION_CONVERTER key; has the value nullstatic final String
Default value for the JESSOP_COMPILE_TARGET key; has the value "false"static final String
Default value for the JESSOP_ENGINE key; has the value "rhino"static final String
Default value for the JESSOP_EXCEPTION_CONVERTER key; has the value nullstatic final String
Default value for the JESSOP_LANGUAGE key; has the value "javascript"static final String
Default value for the JESSOP_SUPPRESS_EOL key; has the value "false"static final String
Reserved key for a named value that identifies the initial ScriptEngine used for jessop scripts.static final String
Reserved key for a named value that sets the initial exception converter.static final String
Reserved key for a named value that identifies the initial language used for jessop scripts.static final String
Reserved key for a named value that controls whether the target script will have EOLs suppressed after scriptlets that appear at the end of a line.Fields inherited from class javax.script.AbstractScriptEngine
context
Fields inherited from interface javax.script.ScriptEngine
ARGV, ENGINE, ENGINE_VERSION, FILENAME, LANGUAGE, LANGUAGE_VERSION, NAME
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioneval
(Reader reader, ScriptContext context) eval
(String script, ScriptContext context) Methods inherited from class javax.script.AbstractScriptEngine
eval, eval, get, getBindings, getContext, getScriptContext, put, setBindings, setContext
-
Field Details
-
JESSOP_LANGUAGE
Reserved key for a named value that identifies the initial language used for jessop scripts. If not set, will default to 'javascript'- See Also:
-
JESSOP_DEFAULT_LANGUAGE
Default value for the JESSOP_LANGUAGE key; has the value "javascript"- See Also:
-
JESSOP_ENGINE
Reserved key for a named value that identifies the initial ScriptEngine used for jessop scripts. If not set, will use the default engine for the default language.- See Also:
-
JESSOP_DEFAULT_ENGINE
Default value for the JESSOP_ENGINE key; has the value "rhino"- See Also:
-
JESSOP_EXCEPTION_CONVERTER
Reserved key for a named value that sets the initial exception converter. If not set, will use the default converter for the default language- See Also:
-
JESSOP_DEFAULT_EXCEPTION_CONVERTER
Default value for the JESSOP_EXCEPTION_CONVERTER key; has the value null -
JESSOP_BINDINGS_CONVERTER
Reserved key for a named value that sets the initial bindings converter. If not set, will use the default converter for the default language- See Also:
-
JESSOP_DEFAULT_BINDINGS_CONVERTER
Default value for the JESSOP_EXCEPTION_CONVERTER key; has the value null -
JESSOP_COMPILE_TARGET
Reserved key for a named value that controls whether the target script is compiled (providing the target engine allows it). If not set, will default to 'false'.- See Also:
-
JESSOP_DEFAULT_COMPILE_TARGET
Default value for the JESSOP_COMPILE_TARGET key; has the value "false"- See Also:
-
JESSOP_SUPPRESS_EOL
Reserved key for a named value that controls whether the target script will have EOLs suppressed after scriptlets that appear at the end of a line. If not set, will default to 'false'.- See Also:
-
JESSOP_DEFAULT_SUPPRESS_EOL
Default value for the JESSOP_SUPPRESS_EOL key; has the value "false"- See Also:
-
-
Constructor Details
-
JessopScriptEngine
public JessopScriptEngine()
-
-
Method Details
-
eval
- Specified by:
eval
in interfaceScriptEngine
- Throws:
ScriptException
-
eval
- Specified by:
eval
in interfaceScriptEngine
- Throws:
ScriptException
-
eval
- Specified by:
eval
in interfaceScriptEngine
- Overrides:
eval
in classAbstractScriptEngine
- Throws:
ScriptException
-
eval
- Specified by:
eval
in interfaceScriptEngine
- Overrides:
eval
in classAbstractScriptEngine
- Throws:
ScriptException
-
createBindings
- Specified by:
createBindings
in interfaceScriptEngine
-
getFactory
- Specified by:
getFactory
in interfaceScriptEngine
-
compile
- Specified by:
compile
in interfaceCompilable
- Throws:
ScriptException
-
compile
- Specified by:
compile
in interfaceCompilable
- Throws:
ScriptException
-