Class FieldAccessNode
- java.lang.Object
-
- org.checkerframework.dataflow.cfg.node.Node
-
- org.checkerframework.dataflow.cfg.node.FieldAccessNode
-
- All Implemented Interfaces:
org.plumelib.util.UniqueId
public class FieldAccessNode extends Node
A node for a field access, including a method accesses:expression . field
-
-
Field Summary
Fields Modifier and Type Field Description protected javax.lang.model.element.VariableElement
element
The element of the accessed field.protected java.lang.String
field
The name of the accessed field.protected Node
receiver
The receiver node of the field access.protected com.sun.source.tree.Tree
tree
The tree of the field access.
-
Constructor Summary
Constructors Constructor Description FieldAccessNode(com.sun.source.tree.Tree tree, javax.lang.model.element.VariableElement element, Node receiver)
FieldAccessNode(com.sun.source.tree.Tree tree, Node receiver)
Creates a new FieldAccessNode.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <R,P>
Raccept(NodeVisitor<R,P> visitor, P p)
Accept method of the visitor pattern.boolean
equals(@Nullable java.lang.Object obj)
javax.lang.model.element.VariableElement
getElement()
java.lang.String
getFieldName()
java.util.Collection<Node>
getOperands()
Node
getReceiver()
com.sun.source.tree.Tree
getTree()
Returns theTree
in the abstract syntax tree, ornull
if no corresponding tree exists.int
hashCode()
boolean
isStatic()
Determine whether the field is static or not.java.lang.String
toString()
-
Methods inherited from class org.checkerframework.dataflow.cfg.node.Node
getBlock, getInSource, getTransitiveOperands, getType, getUid, isLValue, nodeCollectionToString, setBlock, setInSource, setLValue, toStringDebug
-
-
-
-
Field Detail
-
tree
protected final com.sun.source.tree.Tree tree
The tree of the field access.
-
element
protected final javax.lang.model.element.VariableElement element
The element of the accessed field.
-
field
protected final java.lang.String field
The name of the accessed field.
-
receiver
protected final Node receiver
The receiver node of the field access.
-
-
Constructor Detail
-
FieldAccessNode
public FieldAccessNode(com.sun.source.tree.Tree tree, Node receiver)
Creates a new FieldAccessNode.- Parameters:
tree
- the tree from which to create a FieldAccessNodereceiver
- the receiver for the resulting FieldAccessNode
-
FieldAccessNode
public FieldAccessNode(com.sun.source.tree.Tree tree, javax.lang.model.element.VariableElement element, Node receiver)
-
-
Method Detail
-
getElement
public javax.lang.model.element.VariableElement getElement()
-
getReceiver
public Node getReceiver()
-
getFieldName
public java.lang.String getFieldName()
-
getTree
public com.sun.source.tree.Tree getTree()
Description copied from class:Node
Returns theTree
in the abstract syntax tree, ornull
if no corresponding tree exists. For instance, this is the case for anImplicitThisNode
.
-
accept
public <R,P> R accept(NodeVisitor<R,P> visitor, P p)
Description copied from class:Node
Accept method of the visitor pattern.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
isStatic
public boolean isStatic()
Determine whether the field is static or not.- Returns:
- whether the field is static or not
-
equals
public boolean equals(@Nullable java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
getOperands
@SideEffectFree public java.util.Collection<Node> getOperands()
Description copied from class:Node
- Specified by:
getOperands
in classNode
- Returns:
- a collection containing all of the operand
Node
s of thisNode
-
-