Class InstanceOfNode
java.lang.Object
org.checkerframework.dataflow.cfg.node.Node
org.checkerframework.dataflow.cfg.node.InstanceOfNode
- All Implemented Interfaces:
- org.plumelib.util.UniqueId
A node for the instanceof operator:
 
x instanceof Point
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected final @Nullable LocalVariableNodeThe node of the binding variable if one exists.protected final NodeThe value being tested.protected final TypeMirrorThe reference type being tested against.protected final InstanceOfTreeThe tree associated with this node.protected final TypesFor Types.isSameType.
- 
Constructor SummaryConstructorsConstructorDescriptionInstanceOfNode(InstanceOfTree tree, Node operand, @Nullable LocalVariableNode bindingVariable, TypeMirror refType, Types types) Create an InstanceOfNode.InstanceOfNode(InstanceOfTree tree, Node operand, TypeMirror refType, Types types) Create an InstanceOfNode.
- 
Method SummaryModifier and TypeMethodDescription<R,P> R accept(NodeVisitor<R, P> visitor, P p) Accept method of the visitor pattern.booleanReturns the binding variable for this instanceof, or null if one does not exist.The reference type being tested against.getTree()Returns theTreein the abstract syntax tree, ornullif no corresponding tree exists.inthashCode()toString()Methods inherited from class org.checkerframework.dataflow.cfg.node.NodegetBlock, getInSource, getTransitiveOperands, getType, getUid, isLValue, nodeCollectionToString, setBlock, setInSource, setLValue, toStringDebugMethods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.plumelib.util.UniqueIdgetClassAndUid
- 
Field Details- 
operandThe value being tested.
- 
refTypeThe reference type being tested against.
- 
treeThe tree associated with this node.
- 
bindingVariableThe node of the binding variable if one exists.
- 
typesFor Types.isSameType.
 
- 
- 
Constructor Details- 
InstanceOfNodeCreate an InstanceOfNode.- Parameters:
- tree- instanceof tree
- operand- the expression in the instanceof tree
- refType- the type in the instanceof
- types- types util
 
- 
InstanceOfNodepublic InstanceOfNode(InstanceOfTree tree, Node operand, @Nullable LocalVariableNode bindingVariable, TypeMirror refType, Types types) Create an InstanceOfNode.- Parameters:
- tree- instanceof tree
- operand- the expression in the instanceof tree
- bindingVariable- the binding variable or null if there is none
- refType- the type in the instanceof
- types- types util
 
 
- 
- 
Method Details- 
getOperand
- 
getBindingVariableReturns the binding variable for this instanceof, or null if one does not exist.- Returns:
- the binding variable for this instanceof, or null if one does not exist
 
- 
getRefTypeThe reference type being tested against.- Returns:
- the reference type
 
- 
getTreeDescription copied from class:NodeReturns theTreein the abstract syntax tree, ornullif no corresponding tree exists. For instance, this is the case for anImplicitThisNode.
- 
acceptDescription copied from class:NodeAccept method of the visitor pattern.
- 
toString
- 
equals
- 
hashCodepublic int hashCode()
- 
getOperandsDescription copied from class:Node- Specified by:
- getOperandsin class- Node
- Returns:
- a collection containing all of the operand Nodes of thisNode
 
 
-