Package org.ringojs.engine
Class RingoContextFactory
- java.lang.Object
-
- org.mozilla.javascript.ContextFactory
-
- org.ringojs.engine.RingoContextFactory
-
public class RingoContextFactory extends org.mozilla.javascript.ContextFactory
-
-
Constructor Summary
Constructors Constructor Description RingoContextFactory(RhinoEngine engine, RingoConfig config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
hasFeature(org.mozilla.javascript.Context cx, int featureIndex)
protected void
observeInstructionCount(org.mozilla.javascript.Context cx, int instructionCount)
Implementation ofContext.observeInstructionCount(int instructionCount)
.protected void
onContextCreated(org.mozilla.javascript.Context cx)
protected void
onContextReleased(org.mozilla.javascript.Context cx)
void
setGeneratingDebug(boolean generatingDebug)
void
setLanguageVersion(int version)
void
setOptimizationLevel(int optimizationLevel)
void
setParentProtoProperties(boolean flag)
void
setStrictMode(boolean flag)
void
setWarningAsError(boolean flag)
-
Methods inherited from class org.mozilla.javascript.ContextFactory
addListener, call, checkNotSealed, createClassLoader, doTopCall, enter, enterContext, enterContext, exit, getApplicationClassLoader, getE4xImplementationFactory, getGlobal, getGlobalSetter, hasExplicitGlobal, initApplicationClassLoader, initGlobal, isSealed, makeContext, removeListener, seal
-
-
-
-
Constructor Detail
-
RingoContextFactory
public RingoContextFactory(RhinoEngine engine, RingoConfig config)
-
-
Method Detail
-
hasFeature
protected boolean hasFeature(org.mozilla.javascript.Context cx, int featureIndex)
- Overrides:
hasFeature
in classorg.mozilla.javascript.ContextFactory
-
onContextCreated
protected void onContextCreated(org.mozilla.javascript.Context cx)
- Overrides:
onContextCreated
in classorg.mozilla.javascript.ContextFactory
-
onContextReleased
protected void onContextReleased(org.mozilla.javascript.Context cx)
- Overrides:
onContextReleased
in classorg.mozilla.javascript.ContextFactory
-
observeInstructionCount
protected void observeInstructionCount(org.mozilla.javascript.Context cx, int instructionCount)
Implementation ofContext.observeInstructionCount(int instructionCount)
. This can be used to customizeContext
without introducing additional subclasses.- Overrides:
observeInstructionCount
in classorg.mozilla.javascript.ContextFactory
-
setStrictMode
public void setStrictMode(boolean flag)
-
setParentProtoProperties
public void setParentProtoProperties(boolean flag)
-
setWarningAsError
public void setWarningAsError(boolean flag)
-
setLanguageVersion
public void setLanguageVersion(int version)
-
setOptimizationLevel
public void setOptimizationLevel(int optimizationLevel)
-
setGeneratingDebug
public void setGeneratingDebug(boolean generatingDebug)
-
-