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 @MonotonicNonNull List<LocalVariableNode>A list of all binding variables in this instanceof.protected final NodeThe value being tested.The node of the pattern if one exists.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 Node patternNode, 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.booleanDeprecated.Return all the binding variables in this instanceof.Returns the pattern 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.
- 
patternNodeThe node of the pattern if one exists.
- 
typesFor Types.isSameType.
- 
bindingVariablesA list of all binding variables in this instanceof. This is lazily initialized, usegetBindingVariables().
 
- 
- 
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 Node patternNode, TypeMirror refType, Types types) Create an InstanceOfNode.- Parameters:
- tree- instanceof tree
- operand- the expression in the instanceof tree
- patternNode- the pattern node or null if there is none
- refType- the type in the instanceof
- types- types util
 
 
- 
- 
Method Details- 
getOperand
- 
getBindingVariableDeprecated.UsegetPatternNode()orgetBindingVariables()instead.Returns 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
 
- 
getBindingVariablesReturn all the binding variables in this instanceof.- Returns:
- all the binding variables in this instanceof
 
- 
getPatternNodeReturns the pattern for this instanceof, or null if one does not exist.- Returns:
- the pattern 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
 
 
- 
getPatternNode()orgetBindingVariables()instead.