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
Fields -
Constructor Summary
Constructors -
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:
getEngineNamein interfaceScriptEngineFactory
-
getEngineVersion
- Specified by:
getEngineVersionin interfaceScriptEngineFactory
-
getExtensions
- Specified by:
getExtensionsin interfaceScriptEngineFactory
-
getMimeTypes
- Specified by:
getMimeTypesin interfaceScriptEngineFactory
-
getNames
- Specified by:
getNamesin interfaceScriptEngineFactory
-
getLanguageName
- Specified by:
getLanguageNamein interfaceScriptEngineFactory
-
getLanguageVersion
- Specified by:
getLanguageVersionin interfaceScriptEngineFactory
-
getParameter
- Specified by:
getParameterin interfaceScriptEngineFactory
-
getMethodCallSyntax
- Specified by:
getMethodCallSyntaxin interfaceScriptEngineFactory
-
getOutputStatement
- Specified by:
getOutputStatementin interfaceScriptEngineFactory
-
getProgram
- Specified by:
getProgramin interfaceScriptEngineFactory
-
getScriptEngine
- Specified by:
getScriptEnginein interfaceScriptEngineFactory
-