public interface Evaluator
Modifier and Type | Method and Description |
---|---|
void |
captureStackInfo(RhinoException ex)
Capture stack information from the given exception.
|
Object |
compile(CompilerEnvirons compilerEnv,
ScriptNode tree,
String encodedSource,
boolean returnFunction)
Compile the script or function from intermediate representation
tree into an executable form.
|
Function |
createFunctionObject(Context cx,
Scriptable scope,
Object bytecode,
Object staticSecurityDomain)
Create a function object.
|
Script |
createScriptObject(Object bytecode,
Object staticSecurityDomain)
Create a script object.
|
String |
getPatchedStack(RhinoException ex,
String nativeStackTrace)
Given a native stack trace, patch it with script-specific source
and line information
|
List<String> |
getScriptStack(RhinoException ex)
Get the script stack for the given exception
|
String |
getSourcePositionFromStack(Context cx,
int[] linep)
Get the source position information by examining the stack.
|
void |
setEvalScriptFlag(Script script)
Mark the given script to indicate it was created by a call to
eval() or to a Function constructor.
|
Object compile(CompilerEnvirons compilerEnv, ScriptNode tree, String encodedSource, boolean returnFunction)
compilerEnv
- Compiler environmenttree
- parse treeencodedSource
- encoding of the source code for decompilationreturnFunction
- if true, compiling a functionFunction createFunctionObject(Context cx, Scriptable scope, Object bytecode, Object staticSecurityDomain)
cx
- Current contextscope
- scope of the functionbytecode
- opaque object returned by compilestaticSecurityDomain
- security domainScript createScriptObject(Object bytecode, Object staticSecurityDomain)
bytecode
- opaque object returned by compilestaticSecurityDomain
- security domainvoid captureStackInfo(RhinoException ex)
ex
- an exception thrown during executionString getSourcePositionFromStack(Context cx, int[] linep)
cx
- Contextlinep
- Array object of length >= 1; getSourcePositionFromStack
will assign the line number to linep[0].String getPatchedStack(RhinoException ex, String nativeStackTrace)
ex
- exceptionnativeStackTrace
- the native stack traceList<String> getScriptStack(RhinoException ex)
ex
- exception from executionvoid setEvalScriptFlag(Script script)
script
- script to mark as from evalCopyright © 2010 - 2020 Adobe. All Rights Reserved