public class RhinoScriptEngineFactory extends Object implements ScriptEngineFactory
ContextFactory
. Uses the configured
ContextFactory
to compile and evaluate scripts and so does not require use of the
global context factory.Modifier and Type | Field and Description |
---|---|
static int |
INTERPRETED
Optimisation level constant indicating that scripts should be fully interpreted and not compiled.
|
Constructor and Description |
---|
RhinoScriptEngineFactory()
Constructs the script engine factory with a fresh context factory and no class-shutter.
|
RhinoScriptEngineFactory(org.mozilla.javascript.ContextFactory contextFactory)
Constructs a script engine factory using the given context factory and class-shutter.
|
Modifier and Type | Method and Description |
---|---|
String |
getEngineName() |
String |
getEngineVersion() |
List<String> |
getExtensions() |
String |
getLanguageName() |
String |
getLanguageVersion() |
String |
getMethodCallSyntax(String object,
String method,
String... args) |
List<String> |
getMimeTypes() |
List<String> |
getNames() |
String |
getOutputStatement(String s) |
Object |
getParameter(String paramName) |
String |
getProgram(String... statements) |
ScriptEngine |
getScriptEngine() |
void |
setClassShutter(org.mozilla.javascript.ClassShutter classShutter)
Sets the class shutter to be used to sandbox scripts running in this engine.
|
void |
setOptimisationLevel(int optimisationLevel)
Sets the optimisation level to use for context objects created by this script engine.
|
String |
toString() |
public static final int INTERPRETED
public RhinoScriptEngineFactory(org.mozilla.javascript.ContextFactory contextFactory)
contextFactory
- the Rhino context factory. May not be null.public RhinoScriptEngineFactory()
public String getEngineName()
getEngineName
in interface ScriptEngineFactory
public String getEngineVersion()
getEngineVersion
in interface ScriptEngineFactory
public List<String> getExtensions()
getExtensions
in interface ScriptEngineFactory
public List<String> getMimeTypes()
getMimeTypes
in interface ScriptEngineFactory
public List<String> getNames()
getNames
in interface ScriptEngineFactory
public String getLanguageName()
getLanguageName
in interface ScriptEngineFactory
public String getLanguageVersion()
getLanguageVersion
in interface ScriptEngineFactory
public Object getParameter(String paramName)
getParameter
in interface ScriptEngineFactory
public String getMethodCallSyntax(String object, String method, String... args)
getMethodCallSyntax
in interface ScriptEngineFactory
public String getOutputStatement(String s)
getOutputStatement
in interface ScriptEngineFactory
public String getProgram(String... statements)
getProgram
in interface ScriptEngineFactory
public ScriptEngine getScriptEngine()
getScriptEngine
in interface ScriptEngineFactory
public void setOptimisationLevel(int optimisationLevel)
INTERPRETED
to disable all optimisations and use a purely interpreted script engine.optimisationLevel
- the optimisation level to use.public void setClassShutter(org.mozilla.javascript.ClassShutter classShutter)
classShutter
- the class-shutter to use. May be null to disable sandboxing.Copyright © 2010–2025 Open Identity Platform Community. All rights reserved.