com.ibm.di.script
Class ScriptEngineOptions
java.lang.Object
com.ibm.jscript.JSContext
com.ibm.di.script.ScriptEngineOptions
public class ScriptEngineOptions extends com.ibm.jscript.JSContext
This class configures the IBM JS script engine.
Since 2.2
The isDebugAllowed is now final static so setDebugAllowed
were removed to comply with the new JSContext interface.
Since 2.0 ScriptEngineOptions is no longer just an options class. It also
provides the isDebugAllowed() method that is different for each instance of
the engine. Although this could be a static hastable with reference to the
current thread, the overhead of allocating a new JSContext is fairly small
since we don't use the script caching features of the JSContext.
Nested classes/interfaces inherited from class com.ibm.jscript.JSContext
com.ibm.jscript.JSContext.ILibrary, com.ibm.jscript.JSContext.LibraryInitializer, com.ibm.jscript.JSContext.PropertyResolver
Fields inherited from class com.ibm.jscript.JSContext
ENABLE_JSDEBUGGER
Methods inherited from class com.ibm.jscript.JSContext
addDesignTimeClassLoader, createExpression, createExpression, evaluateConstant, evaluateConstantAsString, getAccessControlContext, getASTProgram, getBeanInfo, getCachedExpression, getClassInfo, getDesignTimeClassLoaders, getExpression, getExpression, getExpression, getExpression, getExpression, getExpression, getExpressionCache, getJsonFactory, getLibraryInitializer, getPropertyResolver, getRegistry, getSourceTabSize, getStandardStream, getStaticContext, getTempExecutionContext, getVersion, hasDefaultListOp, hasExpressionCache, hasJavaBridge, hasJSLibrary, hasRhinoProtoExtensions, includeCallerFunctionContext, init, isDebugAllowed, isJavaConstructorAllowed, isJavaFieldAllowed, isJavaMethodAllowed, isJavaPropertyAllowed, isRuntimeOptimized, loadClass, loadLibrary, parseScript, print, println, putCachedExpression, putClassInfo, setJsonFactory, setLibraryInitializer, setPropertyResolver, setVersion, useGeneratedWrappers
Methods inherited from class java.lang.Object
clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait , wait , wait
ScriptEngineOptions
public ScriptEngineOptions ()
ScriptEngineOptions
public ScriptEngineOptions (boolean useCache,
boolean debug)
get
public static com.ibm.jscript.JSContext get ()
Returns a context with no debugging and cache disabled
Returns: a context.
get
public static com.ibm.jscript.JSContext get (boolean debug)
Returns a context with debugging enabled and cache disabled
Returns: a context.
addDebugListener
public void addDebugListener (ScriptEngineOptions.TDIDebugListener listener)
removeDebugListener
public void removeDebugListener (ScriptEngineOptions.TDIDebugListener listener)
isDebug
public boolean isDebug ()
debugStatement
public void debugStatement (com.ibm.jscript.ASTTree.ASTNode statement,
com.ibm.jscript.engine.IExecutionContext context)
throws com.ibm.jscript.JavaScriptException
Called by ASTDebug
Parameters: statement
- The statement about to be executedcontext
- The context in which the statement executes
Throws:
com.ibm.jscript.JavaScriptException
hasStringLengthAsMethod
public boolean hasStringLengthAsMethod ()
Overrides: hasStringLengthAsMethod
in class com.ibm.jscript.JSContext
Returns: true
hasStringExtendedMethods
public boolean hasStringExtendedMethods ()
Overrides: hasStringExtendedMethods
in class com.ibm.jscript.JSContext
Returns: true
hasGlobalObjectExtensions
public boolean hasGlobalObjectExtensions ()
Overrides: hasGlobalObjectExtensions
in class com.ibm.jscript.JSContext
Returns: true
hasJUnitExtensions
public boolean hasJUnitExtensions ()
Overrides: hasJUnitExtensions
in class com.ibm.jscript.JSContext
Returns: false
hasObjectPrototypeExtensions
public boolean hasObjectPrototypeExtensions ()
Overrides: hasObjectPrototypeExtensions
in class com.ibm.jscript.JSContext
Returns: true
hasMathExtensions
public boolean hasMathExtensions ()
Overrides: hasMathExtensions
in class com.ibm.jscript.JSContext
Returns: true
hasListOperator
public boolean hasListOperator ()
Returns: false
hasRhinoExtensions
public boolean hasRhinoExtensions ()
Overrides: hasRhinoExtensions
in class com.ibm.jscript.JSContext
Returns: true
hasJavaBeanAccess
public boolean hasJavaBeanAccess ()
Overrides: hasJavaBeanAccess
in class com.ibm.jscript.JSContext
Returns: true
autoConvertJavaArgsToString
public boolean autoConvertJavaArgsToString ()
Overrides: autoConvertJavaArgsToString
in class com.ibm.jscript.JSContext
Returns: true
ignoreJavaCallAmbiguities
public boolean ignoreJavaCallAmbiguities ()
Overrides: ignoreJavaCallAmbiguities
in class com.ibm.jscript.JSContext
Returns: true
getProperty
public com.ibm.jscript.IValue getProperty (Object object,
String propertyName)
throws com.ibm.jscript.InterpretException
Overrides: getProperty
in class com.ibm.jscript.JSContext
Throws:
com.ibm.jscript.InterpretException
putProperty
public boolean putProperty (Object object,
String propertyName,
com.ibm.jscript.IValue value)
throws com.ibm.jscript.InterpretException
Overrides: putProperty
in class com.ibm.jscript.JSContext
Throws:
com.ibm.jscript.InterpretException
wrapObject
public com.ibm.jscript.types.JavaWrapperObject wrapObject (Object o)
Overrides: wrapObject
in class com.ibm.jscript.JSContext