public class MemberAccessExpressionNode extends BinaryOperatorNodeBase implements IMemberAccessExpressionNode
object.fieldName
object..descendantsName
xmlObject.(expr)
IOperatorNode.ExpressionType, IOperatorNode.OperatorType
leftOperandNode, rightOperandNode
operatorStart
flags
emptyNodeArray, parent
UNKNOWN
Constructor and Description |
---|
MemberAccessExpressionNode(ExpressionNodeBase left,
IASToken operatorToken,
ExpressionNodeBase right)
Constructor.
|
MemberAccessExpressionNode(MemberAccessExpressionNode 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 MemberAccessExpressionNode |
copy()
Copy the ExpressionNodeBase and its subtree.
|
String |
getDisplayString()
Returns a string representation of this member access node, including the operator.
|
Name |
getMName(ICompilerProject project)
Gets the AET
Name object to be used for an expression. |
ASTNodeID |
getNodeID()
Get the opcode of this node
|
IOperatorNode.OperatorType |
getOperator()
Returns the type of the operator that is referenced from this expression
|
String |
getOperatorText() |
boolean |
isDynamicExpression(ICompilerProject project)
Does this expression evaluate to a dynamic value
|
boolean |
isMemberReference(IASNode node)
Is the given node this node's member reference?
|
boolean |
isSuper(ExpressionNodeBase node) |
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 |
setStemAsPackage(boolean b)
Tell the MemberAccessExpression that it's "stem" ('a.b' in 'a.b.Foo')
should always be treated as a package, regardless of whether it is
imported or not.
|
boolean |
stemIsPackage()
Determine if the left side of this Node refers to a package name
|
create, fillInOffsets, getChild, getChildCount, getExpressionType, getLeftOperandNode, getRightOperandNode, isOperatingOnArray, resolveAssignmentType, resolveLogicalType, setChildren, setLeftOperandNode, setRightOperandNode
buildInnerString, getOperatorAbsoluteEnd, getOperatorAbsoluteStart, getOperatorEnd, getOperatorStart, isTerminal
copyForInitializer, getASScope, getBaseExpression, getDecorationNode, getDependencyType, getParentExpression, hasParenthesis, inFilter, inWith, isPackageReference, normalize, setHasParenthesis
analyze, buildStringRecursive, canContinueContainmentSearch, collectImportNodes, combineAttributes, connectedToProjectScope, contains, endAfter, endAfter, endBefore, endBefore, getAbsoluteEnd, getAbsoluteStart, getAncestorOfType, getContainingFilePath, getContainingNode, getContainingScope, getEnd, getFileScope, getFileSpecification, getInnerString, getNodeKind, getPackageName, getParent, getScopeNode, getSpanningStart, getStart, getSucceedingNode, getWorkspace, isTransparent, looselyContains, replaceChild, runPostProcess, 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
getLeftOperandNode, getRightOperandNode
getExpressionType, getOperatorAbsoluteEnd, getOperatorAbsoluteStart, getOperatorEnd, getOperatorStart
copyForInitializer, hasParenthesis
contains, getAncestorOfType, getChild, getChildCount, getContainingNode, getContainingScope, getFileSpecification, getPackageName, getParent, getSpanningStart, getSucceedingNode, isTerminal
getAbsoluteEnd, getAbsoluteStart, getColumn, getEnd, getEndColumn, getEndLine, getLine, getSourcePath, getStart
public MemberAccessExpressionNode(ExpressionNodeBase left, IASToken operatorToken, ExpressionNodeBase right)
left
- the expression on the left of the member access (the object)operatorToken
- the ASToken holding the member access operator (".")right
- the expression on the right of the member access (the
member)public MemberAccessExpressionNode(MemberAccessExpressionNode other)
other
- The node to copy.public ASTNodeID getNodeID()
IASNode
public IDefinition resolve(ICompilerProject project)
IExpressionNode
resolve
in interface IExpressionNode
resolve
in class ExpressionNodeBase
project
- The ICompilerProject
to use to do lookups.IDefinition
this expression refers to.public ITypeDefinition resolveType(ICompilerProject project)
IExpressionNode
resolveType
in interface IExpressionNode
resolveType
in class BinaryOperatorNodeBase
project
- The ICompilerProject
to use to do lookups.ITypeDefinition
of the type this expression results in.public boolean isDynamicExpression(ICompilerProject project)
IExpressionNode
isDynamicExpression
in interface IExpressionNode
isDynamicExpression
in class ExpressionNodeBase
project
- The ICompilerProject
to use to do lookups.true
if we evaluate to something dynamicprotected MemberAccessExpressionNode copy()
ExpressionNodeBase
copy
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 ExpressionNodeBase
project
- The ICompilerProject
to use to do lookups.Name
object.public INamespaceReference computeNamespaceReference()
ExpressionNodeBase
computeNamespaceReference
in class ExpressionNodeBase
public IOperatorNode.OperatorType getOperator()
IOperatorNode
getOperator
in interface IOperatorNode
public String getOperatorText()
getOperatorText
in class OperatorNodeBase
public String getDisplayString()
IMemberAccessExpressionNode
getDisplayString
in interface IMemberAccessExpressionNode
"a.b"
.public boolean isSuper(ExpressionNodeBase node)
public boolean stemIsPackage()
public void setStemAsPackage(boolean b)
public boolean isMemberReference(IASNode node)
node
- - the node of interest.Copyright © 2016 The Apache Software Foundation. All rights reserved.