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 ScriptEngineFactorypublic String getEngineVersion()
getEngineVersion in interface ScriptEngineFactorypublic List<String> getExtensions()
getExtensions in interface ScriptEngineFactorypublic List<String> getMimeTypes()
getMimeTypes in interface ScriptEngineFactorypublic List<String> getNames()
getNames in interface ScriptEngineFactorypublic String getLanguageName()
getLanguageName in interface ScriptEngineFactorypublic String getLanguageVersion()
getLanguageVersion in interface ScriptEngineFactorypublic Object getParameter(String paramName)
getParameter in interface ScriptEngineFactorypublic String getMethodCallSyntax(String object, String method, String... args)
getMethodCallSyntax in interface ScriptEngineFactorypublic String getOutputStatement(String s)
getOutputStatement in interface ScriptEngineFactorypublic String getProgram(String... statements)
getProgram in interface ScriptEngineFactorypublic ScriptEngine getScriptEngine()
getScriptEngine in interface ScriptEngineFactorypublic 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–2024 Open Identity Platform Community. All rights reserved.