public class IdentifierNode extends ExpressionNodeBase implements IIdentifierNode
IIdentifierNode.IdentifierTypeflagsemptyNodeArray, parentUNKNOWN| Modifier | Constructor and Description |
|---|---|
|
IdentifierNode(IASToken token)
Constructor.
|
protected |
IdentifierNode(IdentifierNode other)
Copy constructor.
|
|
IdentifierNode(String name)
Constructor.
|
|
IdentifierNode(String name,
IASToken token)
Constructor.
|
|
IdentifierNode(String name,
antlr.Token token)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
analyze(EnumSet<PostProcessStep> set,
ASScope scope,
Collection<ICompilerProblem> problems) |
protected boolean |
buildInnerString(StringBuilder sb)
For debugging only.
|
protected boolean |
canEarlyBind(ICompilerProject project,
IDefinition def)
Can this Node be early bound to the Definition it refers to.
|
INamespaceReference |
computeNamespaceReference()
Generate an INamespaceReference that can serve as the namespace reference for something
like a namespace initializer.
|
protected IdentifierNode |
copy()
Copy the ExpressionNodeBase and its subtree.
|
static IdentifierNode |
createEmptyIdentifierNodeAfterToken(antlr.Token token)
Create a dummy
IdentifierNode after the given token. |
protected void |
fillInOffsets()
If the start and end offsets haven't been set explicitly, fill them in
based on the offsets of the children.
|
IIdentifierNode.IdentifierType |
getIdentifierType()
Returns of the type of this identifier.
|
Name |
getMName(ICompilerProject project)
Gets the AET
Name object to be used for an expression. |
String |
getName()
Gets the full name of this identifier
|
ASTNodeID |
getNodeID()
Get the opcode of this node
|
IScopedNode |
getScopeNode()
Get the nearest containing scope for this node.
|
protected boolean |
isAttributeIdentifier()
Determine if this identifier is an attribute reference (e.g.
|
boolean |
isDynamicExpression(ICompilerProject project)
Does this expression evaluate to a dynamic value
|
boolean |
isImplicit()
Determines if this identifier is actually implicit and does not exist in source.
|
boolean |
isLegacyCodegen(ICompilerProject project) |
boolean |
isMemberRef()
Is this a reference that should be resolve in another object e.g. the
node for 'b' in a.b would return true
|
boolean |
isTerminal()
Determines if this node is a terminal node, meaning it cannot have
children
|
protected boolean |
isTypeRef()
Is this a type reference - e.g. a base class ref, type anno, etc
|
static boolean |
isXMLish(IDefinition def,
ICompilerProject project)
Determine if the definition passed in is one of the XML types (XML or
XMLList) These classes are unrelated, but behave in similar manners.
|
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 |
setReferenceValue(IDefinition definition) |
copyForInitializer, getASScope, getBaseExpression, getDecorationNode, getDependencyType, getParentExpression, hasParenthesis, inFilter, inWith, isPackageReference, setHasParenthesisbuildStringRecursive, canContinueContainmentSearch, collectImportNodes, combineAttributes, connectedToProjectScope, contains, endAfter, endAfter, endBefore, endBefore, getAbsoluteEnd, getAbsoluteStart, getAncestorOfType, getChild, getChildCount, getContainingFilePath, getContainingNode, getContainingScope, getEnd, getFileScope, getFileSpecification, getInnerString, getNodeKind, getPackageName, getParent, 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, waitcopyForInitializer, hasParenthesiscontains, getAncestorOfType, getChild, getChildCount, getContainingNode, getContainingScope, getFileSpecification, getPackageName, getParent, getSpanningStart, getSucceedingNodegetAbsoluteEnd, getAbsoluteStart, getColumn, getEnd, getEndColumn, getEndLine, getLine, getSourcePath, getStartpublic IdentifierNode(String name)
public IdentifierNode(String name, antlr.Token token)
public IdentifierNode(IASToken token)
protected IdentifierNode(IdentifierNode other)
other - The node to copy.public static IdentifierNode createEmptyIdentifierNodeAfterToken(antlr.Token token)
IdentifierNode after the given token. This is used
to repair the AST where an identifier node is expected.token - The empty ID node will have start offset following this
token.public static boolean isXMLish(IDefinition def, ICompilerProject project)
def - the IDefinition to checkproject - the ICompilerProject in which to look up typespublic ASTNodeID getNodeID()
IASNodepublic boolean isTerminal()
IASNodeisTerminal in interface IASNodeisTerminal in class FixedChildrenNodeprotected void analyze(EnumSet<PostProcessStep> set, ASScope scope, Collection<ICompilerProblem> problems)
public void normalize(boolean fillInOffsets)
ExpressionNodeBasenormalize in class ExpressionNodeBaseprotected void fillInOffsets()
NodeBasefillInOffsets in class NodeBasepublic IScopedNode getScopeNode()
NodeBasegetScopeNode in class NodeBaseprotected boolean buildInnerString(StringBuilder sb)
NodeBasebuildOuterString().
It is overridden by subclasses to display optional node-specific
information in the middle of the string, between the node type and the
location information.buildInnerString in class NodeBasepublic IDefinition resolve(ICompilerProject project)
IExpressionNoderesolve in interface IExpressionNoderesolve in class ExpressionNodeBaseproject - The ICompilerProject to use to do lookups.IDefinition this expression refers to.public ITypeDefinition resolveType(ICompilerProject project)
IExpressionNoderesolveType in interface IExpressionNoderesolveType in class ExpressionNodeBaseproject - The ICompilerProject to use to do lookups.ITypeDefinition of the type this expression results in.protected IdentifierNode copy()
ExpressionNodeBasecopy in class ExpressionNodeBasepublic boolean isDynamicExpression(ICompilerProject project)
IExpressionNodeisDynamicExpression in interface IExpressionNodeisDynamicExpression in class ExpressionNodeBaseproject - The ICompilerProject to use to do lookups.true if we evaluate to something dynamicpublic Name getMName(ICompilerProject project)
ExpressionNodeBaseName 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.
getMName in class ExpressionNodeBaseproject - The ICompilerProject to use to do lookups.Name object.public INamespaceReference computeNamespaceReference()
ExpressionNodeBasecomputeNamespaceReference in class ExpressionNodeBasepublic String getName()
IIdentifierNodegetName in interface IIdentifierNodepublic IIdentifierNode.IdentifierType getIdentifierType()
IIdentifierNodegetIdentifierType in interface IIdentifierNodeIIdentifierNode.IdentifierTypepublic void setReferenceValue(IDefinition definition)
public boolean isImplicit()
protected boolean isAttributeIdentifier()
public boolean isMemberRef()
protected boolean canEarlyBind(ICompilerProject project, IDefinition def)
project - project to resolve things indef - the definition this node resolved toprotected boolean isTypeRef()
public boolean isLegacyCodegen(ICompilerProject project)
Copyright © 2016 The Apache Software Foundation. All rights reserved.