public final class JsProgram extends JsNode
Modifier and Type | Field and Description |
---|---|
static String |
GLOBAL_SCOPE_NAME |
static String |
OBJECT_SCOPE_NAME |
Constructor and Description |
---|
JsProgram() |
JsProgram(CorrelationFactory correlator)
Constructs a JavaScript program object.
|
Modifier and Type | Method and Description |
---|---|
SourceInfo |
createSourceInfo(int lineNumber,
String location) |
SourceInfo |
createSourceInfoSynthetic(Class<?> caller) |
JsProgramFragment |
getFragment(int fragment) |
JsBlock |
getFragmentBlock(int fragment) |
int |
getFragmentCount() |
Collection<JsProgramFragment> |
getFragments() |
JsBlock |
getGlobalBlock()
Gets the one and only global block.
|
NodeKind |
getKind() |
JsScope |
getObjectScope() |
JsScope |
getScope()
Gets the top level scope.
|
void |
setFragmentCount(int fragments) |
void |
traverse(JsVisitor v,
JsContext ctx)
Causes this object to have the visitor visit itself and its children.
|
getSourceInfo, setSourceInfo, toSource, toSource, toString
public static final String OBJECT_SCOPE_NAME
public static final String GLOBAL_SCOPE_NAME
public JsProgram()
public JsProgram(CorrelationFactory correlator)
public SourceInfo createSourceInfo(int lineNumber, String location)
public SourceInfo createSourceInfoSynthetic(Class<?> caller)
public JsProgramFragment getFragment(int fragment)
public JsBlock getFragmentBlock(int fragment)
public int getFragmentCount()
public Collection<JsProgramFragment> getFragments()
public JsBlock getGlobalBlock()
public JsScope getObjectScope()
public JsScope getScope()
public void setFragmentCount(int fragments)
public void traverse(JsVisitor v, JsContext ctx)
JsVisitable
v
- the visitor that should traverse this nodectx
- the context of an existing traversalCopyright © 2018. All rights reserved.