Package org.mozilla.javascript.engine
Class RhinoScriptEngineFactory
java.lang.Object
org.mozilla.javascript.engine.RhinoScriptEngineFactory
- All Implemented Interfaces:
ScriptEngineFactory
This is an implementation of the standard Java "ScriptEngine" for Rhino. If the Rhino engine
(typically in the form of the "rhino-engine" JAR) is in the classpath, then this script engine
will be activated.
See the list of constants in this class for the list of language names, file extensions, and MIME types that this engine supports. This list is essentially the same as the list supported in the Nashorn script engine that was included in Java 8.
Since this engine and Nashorn support the same language and file extensions, then unless you are sure you are running in an environment that has Nashorn, the best way to get this engine is to call ScriptEngine.getEngineByName("rhino") to ask for Rhino directly.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetMethodCallSyntax
(String obj, String m, String... args) getNames()
getOutputStatement
(String toDisplay) getParameter
(String key) getProgram
(String... statements)
-
Field Details
-
NAME
- See Also:
-
-
Constructor Details
-
RhinoScriptEngineFactory
public RhinoScriptEngineFactory()
-
-
Method Details
-
getEngineName
- Specified by:
getEngineName
in interfaceScriptEngineFactory
-
getEngineVersion
- Specified by:
getEngineVersion
in interfaceScriptEngineFactory
-
getExtensions
- Specified by:
getExtensions
in interfaceScriptEngineFactory
-
getMimeTypes
- Specified by:
getMimeTypes
in interfaceScriptEngineFactory
-
getNames
- Specified by:
getNames
in interfaceScriptEngineFactory
-
getLanguageName
- Specified by:
getLanguageName
in interfaceScriptEngineFactory
-
getLanguageVersion
- Specified by:
getLanguageVersion
in interfaceScriptEngineFactory
-
getParameter
- Specified by:
getParameter
in interfaceScriptEngineFactory
-
getMethodCallSyntax
- Specified by:
getMethodCallSyntax
in interfaceScriptEngineFactory
-
getOutputStatement
- Specified by:
getOutputStatement
in interfaceScriptEngineFactory
-
getProgram
- Specified by:
getProgram
in interfaceScriptEngineFactory
-
getScriptEngine
- Specified by:
getScriptEngine
in interfaceScriptEngineFactory
-