public abstract class DataAccessNode extends AbstractParentExprNode
ExprNode.Kind, ExprNode.OperatorNode, ExprNode.ParentExprNode, ExprNode.PrimitiveNode| Modifier and Type | Field and Description |
|---|---|
protected boolean |
isNullSafe |
| Modifier | Constructor and Description |
|---|---|
protected |
DataAccessNode(DataAccessNode orig,
CopyState copyState) |
protected |
DataAccessNode(ExprNode base,
SourceLocation sourceLocation,
boolean isNullSafe) |
| Modifier and Type | Method and Description |
|---|---|
ExprNode |
getBaseExprChild()
Returns the base expression from which we're looking up the named field.
|
abstract String |
getSourceStringSuffix()
Returns the source string for the part of the expression that accesses the item - in other
words, not including the base expression.
|
boolean |
isNullSafe()
Returns whether this field reference is null-safe.
|
String |
toSourceString()
Builds a Soy source string that could be the source for this node.
|
addChild, 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, setParentprotected DataAccessNode(ExprNode base, SourceLocation sourceLocation, boolean isNullSafe)
base - The base expression, that is a reference to the object containing the named field.sourceLocation - The node's source location.isNullSafe - If true, checks during evaluation whether the base expression is null and
returns null instead of causing an invalid dereference.protected DataAccessNode(DataAccessNode orig, CopyState copyState)
public ExprNode getBaseExprChild()
public boolean isNullSafe()
public abstract String getSourceStringSuffix()
public String toSourceString()
NodeNote: Some nodes do not have a direct mapping to Soy source (such as nodes created during some optimization passes). Thus this method may not always be supported.