public class NamespaceIdentifierNode extends IdentifierNode implements INamespaceDecorationNode
INamespaceDecorationNode.NamespaceDecorationKind
IIdentifierNode.IdentifierType
flags
emptyNodeArray, parent
UNKNOWN
Modifier | Constructor and Description |
---|---|
|
NamespaceIdentifierNode(IASToken t)
Constructor.
|
|
NamespaceIdentifierNode(IdentifierNode node)
Constructor.
|
protected |
NamespaceIdentifierNode(NamespaceIdentifierNode other)
Copy constructor.
|
|
NamespaceIdentifierNode(String text)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected NamespaceIdentifierNode |
copy()
Copy the ExpressionNodeBase and its subtree.
|
IDefinitionNode |
getDecoratedDefinitionNode()
Returns the parent that is being decorated by this
IDecoration |
ExpressionNodeBase |
getDecorationNode()
Get the appropriate node at which to start decoration.
|
Name |
getMName(ICompilerProject project)
Gets the AET
Name object to be used for an expression. |
INamespaceDecorationNode.NamespaceDecorationKind |
getNamespaceDecorationKind()
Returns the type of namespace decoration kind this item represents
|
ASTNodeID |
getNodeID()
Get the opcode of this node
|
IASNode |
getParent()
Get the parent of this node
|
IScopedNode |
getScopeNode()
Get the nearest containing scope for this node.
|
boolean |
isExpressionQualifier()
Is this namespace a qualifier in an expression
such as 'ns' in:
ns::foo;
|
IDefinition |
resolve(ICompilerProject project)
If this expression is statically known to refer to a definition return a
reference to that definition.
|
IQualifiers |
resolveQualifier(ICompilerProject project)
Helper method to determine if this node references one of the builtin
access namespaces these consist of public, private, protected, internal,
and the any namespace - '*'
Helper method to determine if this node references one of the built-in
access namespaces.
|
void |
setDecorationTarget(IDefinitionNode decoratingParent) |
void |
setIsConfigNamespace(boolean isConfig)
Sets that this namespace is a config name used for conditional
compilation
|
analyze, buildInnerString, canEarlyBind, computeNamespaceReference, createEmptyIdentifierNodeAfterToken, fillInOffsets, getIdentifierType, getName, isAttributeIdentifier, isDynamicExpression, isImplicit, isLegacyCodegen, isMemberRef, isTerminal, isTypeRef, isXMLish, normalize, resolveType, setReferenceValue
copyForInitializer, getASScope, getBaseExpression, getDependencyType, getParentExpression, hasParenthesis, inFilter, inWith, isPackageReference, setHasParenthesis
buildStringRecursive, canContinueContainmentSearch, collectImportNodes, combineAttributes, connectedToProjectScope, contains, endAfter, endAfter, endBefore, endBefore, getAbsoluteEnd, getAbsoluteStart, getAncestorOfType, getChild, getChildCount, getContainingFilePath, getContainingNode, getContainingScope, getEnd, getFileScope, getFileSpecification, getInnerString, getNodeKind, getPackageName, getSpanningStart, getStart, getSucceedingNode, getWorkspace, isTransparent, looselyContains, replaceChild, runPostProcess, setChildren, setParent, span, span, span, startAfter, startAfter, startBefore, startBefore, swapChildren, toString, tryGetOffsetLookup, verify
getColumn, getEndColumn, getEndLine, getLine, getLineColumnString, getOffsetsString, getSourcePath, getSourcePathString, setColumn, setEnd, setEndColumn, setEndLine, setLine, setSourceLocation, setSourcePath, setStart, span, span
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getIdentifierType, getName
copyForInitializer, hasParenthesis, isDynamicExpression, resolveType
contains, getAncestorOfType, getChild, getChildCount, getContainingNode, getContainingScope, getFileSpecification, getPackageName, getSpanningStart, getSucceedingNode, isTerminal
getAbsoluteEnd, getAbsoluteStart, getColumn, getEnd, getEndColumn, getEndLine, getLine, getSourcePath, getStart
public NamespaceIdentifierNode(IASToken t)
t
- The token representing the namespace.public NamespaceIdentifierNode(String text)
text
- The namespace as a String.public NamespaceIdentifierNode(IdentifierNode node)
node
- The node reprsenting the namespace.protected NamespaceIdentifierNode(NamespaceIdentifierNode other)
other
- The node to copy.public ASTNodeID getNodeID()
IASNode
getNodeID
in interface IASNode
getNodeID
in class IdentifierNode
public IASNode getParent()
IASNode
public IDefinition resolve(ICompilerProject project)
IExpressionNode
resolve
in interface IExpressionNode
resolve
in class IdentifierNode
project
- The ICompilerProject
to use to do lookups.IDefinition
this expression refers to.protected NamespaceIdentifierNode copy()
ExpressionNodeBase
copy
in class IdentifierNode
public IScopedNode getScopeNode()
NodeBase
getScopeNode
in class IdentifierNode
public ExpressionNodeBase getDecorationNode()
ExpressionNodeBase
getDecorationNode
in class ExpressionNodeBase
public Name getMName(ICompilerProject project)
ExpressionNodeBase
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.
getMName
in class IdentifierNode
project
- The ICompilerProject
to use to do lookups.Name
object.public IDefinitionNode getDecoratedDefinitionNode()
IDecoration
IDecoration
getDecoratedDefinitionNode
in interface IDecoration
IDefinitionNode
representing the parentpublic INamespaceDecorationNode.NamespaceDecorationKind getNamespaceDecorationKind()
INamespaceDecorationNode
getNamespaceDecorationKind
in interface INamespaceDecorationNode
public void setIsConfigNamespace(boolean isConfig)
isConfig
- trye if this namespace is part of a config expressionpublic void setDecorationTarget(IDefinitionNode decoratingParent)
public IQualifiers resolveQualifier(ICompilerProject project)
public
,
private
, protected
, internal
,
and the 'any' namespace *
.
Resolve this namespace reference to a set of 1 or more namespaces.
Some qualifiers, such as "public" or "protected" may resolve to more than 1 namespace when they
are used as the qualifier of an expression, such as:
f.public::foo;project
- The project to resolve things inpublic boolean isExpressionQualifier()
INamespaceDecorationNode
isExpressionQualifier
in interface INamespaceDecorationNode
Copyright © 2016 The Apache Software Foundation. All rights reserved.