|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.ibm.jscript.JSContext
com.ibm.di.script.ScriptEngineOptions
public class ScriptEngineOptions
This class configures the IBM JS script engine. 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 Class Summary | |
|---|---|
static interface |
ScriptEngineOptions.TDIDebugListener
|
| 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 |
| Field Summary |
|---|
| Fields inherited from class com.ibm.jscript.JSContext |
|---|
ENABLE_JSDEBUGGER |
| Constructor Summary | |
|---|---|
ScriptEngineOptions()
|
|
ScriptEngineOptions(boolean useCache,
boolean debug)
|
|
| Method Summary | |
|---|---|
void |
addDebugListener(ScriptEngineOptions.TDIDebugListener listener)
|
boolean |
autoConvertJavaArgsToString()
|
void |
debugStatement(com.ibm.jscript.ASTTree.ASTNode statement,
com.ibm.jscript.engine.IExecutionContext context)
Called by ASTDebug |
static com.ibm.jscript.JSContext |
get()
Returns a context with no debugging and cache disabled |
static com.ibm.jscript.JSContext |
get(boolean debug)
Returns a context with debugging enabled and cache disabled |
com.ibm.jscript.IValue |
getProperty(Object object,
String propertyName)
|
boolean |
hasGlobalObjectExtensions()
|
boolean |
hasJavaBeanAccess()
|
boolean |
hasJUnitExtensions()
|
boolean |
hasListOperator()
|
boolean |
hasMathExtensions()
|
boolean |
hasObjectPrototypeExtensions()
|
boolean |
hasRhinoExtensions()
|
boolean |
hasStringExtendedMethods()
|
boolean |
hasStringLengthAsMethod()
|
boolean |
ignoreJavaCallAmbiguities()
|
boolean |
isDebugAllowed()
|
boolean |
putProperty(Object object,
String propertyName,
com.ibm.jscript.IValue value)
|
void |
removeDebugListener(ScriptEngineOptions.TDIDebugListener listener)
|
void |
setDebugAllowed(boolean debugAllowed)
Call this method do enable/disabled debug call-backs |
com.ibm.jscript.types.JavaWrapperObject |
wrapObject(Object o)
|
| Methods inherited from class com.ibm.jscript.JSContext |
|---|
addDesignTimeClassLoader, createExpression, createExpression, evaluateConstant, evaluateConstantAsString, getASTProgram, getCachedExpression, getClassInfo, getDesignTimeClassLoaders, getExpression, getExpression, getExpression, getExpression, getExpression, getExpression, getJsonFactory, getLibraryInitializer, getPropertyResolver, getRegistry, getStandardStream, getStaticContext, getVersion, hasExpressionCache, hasJSLibrary, hasRhinoProtoExtensions, includeCallerFunctionContext, init, 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 |
| Constructor Detail |
|---|
public ScriptEngineOptions()
public ScriptEngineOptions(boolean useCache,
boolean debug)
| Method Detail |
|---|
public static com.ibm.jscript.JSContext get()
public static com.ibm.jscript.JSContext get(boolean debug)
public void addDebugListener(ScriptEngineOptions.TDIDebugListener listener)
public void removeDebugListener(ScriptEngineOptions.TDIDebugListener listener)
public void debugStatement(com.ibm.jscript.ASTTree.ASTNode statement,
com.ibm.jscript.engine.IExecutionContext context)
throws com.ibm.jscript.JavaScriptException
statement - The statement about to be executedcontext - The context in which the statement executes
com.ibm.jscript.JavaScriptExceptionpublic boolean isDebugAllowed()
isDebugAllowed in class com.ibm.jscript.JSContextpublic void setDebugAllowed(boolean debugAllowed)
debugAllowed - public boolean hasStringLengthAsMethod()
hasStringLengthAsMethod in class com.ibm.jscript.JSContextpublic boolean hasStringExtendedMethods()
hasStringExtendedMethods in class com.ibm.jscript.JSContextpublic boolean hasGlobalObjectExtensions()
hasGlobalObjectExtensions in class com.ibm.jscript.JSContextpublic boolean hasJUnitExtensions()
hasJUnitExtensions in class com.ibm.jscript.JSContextpublic boolean hasObjectPrototypeExtensions()
hasObjectPrototypeExtensions in class com.ibm.jscript.JSContextpublic boolean hasMathExtensions()
hasMathExtensions in class com.ibm.jscript.JSContextpublic boolean hasListOperator()
hasListOperator in class com.ibm.jscript.JSContextpublic boolean hasRhinoExtensions()
hasRhinoExtensions in class com.ibm.jscript.JSContextpublic boolean hasJavaBeanAccess()
hasJavaBeanAccess in class com.ibm.jscript.JSContextpublic boolean autoConvertJavaArgsToString()
autoConvertJavaArgsToString in class com.ibm.jscript.JSContextpublic boolean ignoreJavaCallAmbiguities()
ignoreJavaCallAmbiguities in class com.ibm.jscript.JSContext
public com.ibm.jscript.IValue getProperty(Object object,
String propertyName)
throws com.ibm.jscript.InterpretException
getProperty in class com.ibm.jscript.JSContextcom.ibm.jscript.InterpretException
public boolean putProperty(Object object,
String propertyName,
com.ibm.jscript.IValue value)
throws com.ibm.jscript.InterpretException
putProperty in class com.ibm.jscript.JSContextcom.ibm.jscript.InterpretExceptionpublic com.ibm.jscript.types.JavaWrapperObject wrapObject(Object o)
wrapObject in class com.ibm.jscript.JSContext
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||