public final class FieldAccessNode extends DataAccessNode
ExprNode.ConstantNode, ExprNode.Kind, ExprNode.OperatorNode, ExprNode.ParentExprNode, ExprNode.PrimitiveNodeisNullSafeSPACES| Constructor and Description |
|---|
FieldAccessNode(ExprNode base,
String fieldName,
boolean isNullSafe) |
| Modifier and Type | Method and Description |
|---|---|
FieldAccessNode |
copy(CopyState copyState)
See
Node.copy(CopyState) for a description of the copy contract. |
String |
getFieldName()
Returns the field name.
|
ExprNode.Kind |
getKind()
Gets this node's kind (corresponding to this node's specific type).
|
String |
getSourceStringSuffix()
Returns the source string for the part of the expression that accesses
the item - in other words, not including the base expression.
|
getBaseExprChild, isNullSafe, toSourceStringaddChild, addChild, addChildren, addChildren, appendSourceStringForChildren, clearChildren, getChild, getChildIndex, getChildren, getType, numChildren, removeChild, removeChild, replaceChild, replaceChild, setTypegetParent, getSourceLocationcouldHaveSyntaxVersionAtLeast, equals, getNearestAncestor, getSyntaxVersionUpperBound, hasAncestor, hashCode, maybeSetSyntaxVersionUpperBound, setParent, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitcouldHaveSyntaxVersionAtLeast, getNearestAncestor, getSourceLocation, getSyntaxVersionUpperBound, hasAncestor, maybeSetSyntaxVersionUpperBound, setParentpublic FieldAccessNode(ExprNode base, String fieldName, boolean isNullSafe)
base - The base expression, that is a reference to the object
containing the named field.fieldName - The name of the field.isNullSafe - If true, checks during evaluation whether the base expression is null
and returns null instead of causing an invalid dereference.public ExprNode.Kind getKind()
ExprNodepublic String getFieldName()
public String getSourceStringSuffix()
getSourceStringSuffix in class DataAccessNodepublic FieldAccessNode copy(CopyState copyState)
ExprNodeNode.copy(CopyState) for a description of the copy contract.