public abstract class ExpressionNodeBase extends FixedChildrenNode implements IExpressionNode
| Modifier and Type | Field and Description |
|---|---|
protected int |
flags |
emptyNodeArray, parentUNKNOWN| Modifier | Constructor and Description |
|---|---|
|
ExpressionNodeBase()
Constructor.
|
protected |
ExpressionNodeBase(ExpressionNodeBase other)
Copy constructor.
|
| Modifier and Type | Method and Description |
|---|---|
INamespaceReference |
computeNamespaceReference()
Generate an INamespaceReference that can serve as the namespace reference for something
like a namespace initializer.
|
protected abstract ExpressionNodeBase |
copy()
Copy the ExpressionNodeBase and its subtree.
|
ExpressionNodeBase |
copyForInitializer(IScopedNode scopedNode)
Return a copy of this IExpressionNode and all it's children that can be used
by VariableDefinition to resolve it's initial value without having to hold onto
the entire syntax tree for a source file.
|
ASScope |
getASScope()
Get the scope this Node uses for name resolution as an ASScope.
|
ExpressionNodeBase |
getBaseExpression()
Get the base expression, if any.
|
ExpressionNodeBase |
getDecorationNode()
Get the appropriate node at which to start decoration.
|
DependencyType |
getDependencyType()
Compute the type of dependency between two compilation unit this
expression node creates.
|
Name |
getMName(ICompilerProject project)
Gets the AET
Name object to be used for an expression. |
protected ExpressionNodeBase |
getParentExpression()
Get the parent of this Node as an ExpressionNodeBase.
|
boolean |
hasParenthesis()
Determines whether this expression is surrounded by parenthesis.
|
boolean |
inFilter()
Check if the expression is inside a filter expression.
|
boolean |
inWith() |
boolean |
isDynamicExpression(ICompilerProject project)
Does this expression evaluate to a dynamic value
|
boolean |
isPackageReference()
Determine if this node is a reference to a package
|
void |
normalize(boolean fillInOffsets)
Normalize the tree.
|
IDefinition |
resolve(ICompilerProject project)
If this expression is statically known to refer to a definition return a
reference to that definition.
|
ITypeDefinition |
resolveType(ICompilerProject project)
The type of the result of this expression.
|
void |
setHasParenthesis(boolean hasParens) |
isTerminalanalyze, buildInnerString, buildStringRecursive, canContinueContainmentSearch, collectImportNodes, combineAttributes, connectedToProjectScope, contains, endAfter, endAfter, endBefore, endBefore, fillInOffsets, getAbsoluteEnd, getAbsoluteStart, getAncestorOfType, getChild, getChildCount, getContainingFilePath, getContainingNode, getContainingScope, getEnd, getFileScope, getFileSpecification, getInnerString, getNodeKind, getPackageName, getParent, getScopeNode, getSpanningStart, getStart, getSucceedingNode, getWorkspace, isTransparent, looselyContains, replaceChild, runPostProcess, setChildren, setParent, span, span, span, startAfter, startAfter, startBefore, startBefore, swapChildren, toString, tryGetOffsetLookup, verifygetColumn, getEndColumn, getEndLine, getLine, getLineColumnString, getOffsetsString, getSourcePath, getSourcePathString, setColumn, setEnd, setEndColumn, setEndLine, setLine, setSourceLocation, setSourcePath, setStart, span, spanclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcontains, getAncestorOfType, getChild, getChildCount, getContainingNode, getContainingScope, getFileSpecification, getNodeID, getPackageName, getParent, getSpanningStart, getSucceedingNode, isTerminalgetAbsoluteEnd, getAbsoluteStart, getColumn, getEnd, getEndColumn, getEndLine, getLine, getSourcePath, getStartpublic ExpressionNodeBase()
protected ExpressionNodeBase(ExpressionNodeBase other)
other - The node to copy.public void normalize(boolean fillInOffsets)
public ASScope getASScope()
NodeBasegetASScope in class NodeBasepublic IDefinition resolve(ICompilerProject project)
IExpressionNoderesolve in interface IExpressionNodeproject - The ICompilerProject to use to do lookups.IDefinition this expression refers to.public ITypeDefinition resolveType(ICompilerProject project)
IExpressionNoderesolveType in interface IExpressionNodeproject - The ICompilerProject to use to do lookups.ITypeDefinition of the type this expression results in.public boolean isDynamicExpression(ICompilerProject project)
IExpressionNodeisDynamicExpression in interface IExpressionNodeproject - The ICompilerProject to use to do lookups.true if we evaluate to something dynamicpublic ExpressionNodeBase copyForInitializer(IScopedNode scopedNode)
IExpressionNodecopyForInitializer in interface IExpressionNodeIExpressionNode that is not tied to the syntax tree it came
from. If a copy can not be generated, null is returned.public boolean hasParenthesis()
IExpressionNodehasParenthesis in interface IExpressionNodetrue if surrounded by parenthesisprotected abstract ExpressionNodeBase copy()
public Name getMName(ICompilerProject project)
Name object to be used for an expression.
For all expression nodes except for the identifier nodes and member
access nodes, this method returns null.
This is the method that the code generator calls to determine what name to emit into the ABC file. It will handle resolving the identifier if necessary and generating the appropriate qname or multiname.
project - The ICompilerProject to use to do lookups.Name object.public void setHasParenthesis(boolean hasParens)
public boolean isPackageReference()
public ExpressionNodeBase getBaseExpression()
a.b, or
a.@b, or a.c::b, the base of b is
a.public boolean inWith()
public ExpressionNodeBase getDecorationNode()
public final boolean inFilter()
xmlData.(getName() == "hello")
getName() == "hello" is in a filter.
The implementation walks up the parent nodes till the first
ScopedBlockNode. If a MemberAccessExpressionNode with
ASTNodeID.E4XFilterID is found, this node is inside a filter
expression.
protected ExpressionNodeBase getParentExpression()
public INamespaceReference computeNamespaceReference()
public DependencyType getDependencyType()
Copyright © 2016 The Apache Software Foundation. All rights reserved.