public class RhinoScriptEngineFactory
extends java.lang.Object
implements javax.script.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.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
NAME |
Constructor and Description |
---|
RhinoScriptEngineFactory() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getEngineName() |
java.lang.String |
getEngineVersion() |
java.util.List<java.lang.String> |
getExtensions() |
java.lang.String |
getLanguageName() |
java.lang.String |
getLanguageVersion() |
java.lang.String |
getMethodCallSyntax(java.lang.String obj,
java.lang.String m,
java.lang.String... args) |
java.util.List<java.lang.String> |
getMimeTypes() |
java.util.List<java.lang.String> |
getNames() |
java.lang.String |
getOutputStatement(java.lang.String toDisplay) |
java.lang.Object |
getParameter(java.lang.String key) |
java.lang.String |
getProgram(java.lang.String... statements) |
javax.script.ScriptEngine |
getScriptEngine() |
public static final java.lang.String NAME
public java.lang.String getEngineName()
getEngineName
in interface javax.script.ScriptEngineFactory
public java.lang.String getEngineVersion()
getEngineVersion
in interface javax.script.ScriptEngineFactory
public java.util.List<java.lang.String> getExtensions()
getExtensions
in interface javax.script.ScriptEngineFactory
public java.util.List<java.lang.String> getMimeTypes()
getMimeTypes
in interface javax.script.ScriptEngineFactory
public java.util.List<java.lang.String> getNames()
getNames
in interface javax.script.ScriptEngineFactory
public java.lang.String getLanguageName()
getLanguageName
in interface javax.script.ScriptEngineFactory
public java.lang.String getLanguageVersion()
getLanguageVersion
in interface javax.script.ScriptEngineFactory
public java.lang.Object getParameter(java.lang.String key)
getParameter
in interface javax.script.ScriptEngineFactory
public java.lang.String getMethodCallSyntax(java.lang.String obj, java.lang.String m, java.lang.String... args)
getMethodCallSyntax
in interface javax.script.ScriptEngineFactory
public java.lang.String getOutputStatement(java.lang.String toDisplay)
getOutputStatement
in interface javax.script.ScriptEngineFactory
public java.lang.String getProgram(java.lang.String... statements)
getProgram
in interface javax.script.ScriptEngineFactory
public javax.script.ScriptEngine getScriptEngine()
getScriptEngine
in interface javax.script.ScriptEngineFactory
Copyright © 2010 - 2023 Adobe. All Rights Reserved