Class LiveVarNode
- java.lang.Object
-
- org.checkerframework.dataflow.livevariable.LiveVarNode
-
public class LiveVarNode extends java.lang.Object
A LiveVarNode contains a CFG node, which can only be a LocalVariableNode or FieldAccessNode. It is used to represent the estimate of live variables at certain CFG block during dataflow analysis. We override `.equals` in this class to compare nodes by value equality rather than reference equality. We want two different nodes with the same value (that is, two nodes refer to the same live variable in the program) to be regarded as the same.
-
-
Field Summary
Fields Modifier and Type Field Description protected Node
liveVariable
A live variable is represented by a node, which can be aLocalVariableNode
orFieldAccessNode
.
-
Constructor Summary
Constructors Constructor Description LiveVarNode(Node n)
Create a new live variable.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(@Nullable java.lang.Object obj)
int
hashCode()
java.lang.String
toString()
-
-
-
Field Detail
-
liveVariable
protected final Node liveVariable
A live variable is represented by a node, which can be aLocalVariableNode
orFieldAccessNode
.
-
-
Constructor Detail
-
LiveVarNode
public LiveVarNode(Node n)
Create a new live variable.- Parameters:
n
- a node
-
-
Method Detail
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(@Nullable java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-