Class DeconstructorPatternNode
java.lang.Object
org.checkerframework.dataflow.cfg.node.Node
org.checkerframework.dataflow.cfg.node.DeconstructorPatternNode
- All Implemented Interfaces:
org.plumelib.util.UniqueId
A node for a deconstrutor pattern.
-
Field Summary
Modifier and TypeFieldDescriptionprotected @MonotonicNonNull List
<LocalVariableNode> A list of nested binding variables.protected final Tree
TheDeconstructorPatternTree
, declared asTree
to permit this file to compile under JDK 20 and earlier.A list of nested pattern nodes. -
Constructor Summary
ConstructorDescriptionDeconstructorPatternNode
(TypeMirror type, Tree deconstructorPattern, List<Node> nestedPatterns) Creates aDeconstructorPatternNode
. -
Method Summary
Modifier and TypeMethodDescription<R,
P> R accept
(NodeVisitor<R, P> visitor, P p) Accept method of the visitor pattern.Return all the binding variables in this pattern.Returns the nested patterns.getTree()
Returns theTree
in the abstract syntax tree, ornull
if no corresponding tree exists.Methods inherited from class org.checkerframework.dataflow.cfg.node.Node
getBlock, getInSource, getTransitiveOperands, getType, getUid, isLValue, nodeCollectionToString, setBlock, setInSource, setLValue, toStringDebug
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.plumelib.util.UniqueId
getClassAndUid
-
Field Details
-
deconstructorPattern
TheDeconstructorPatternTree
, declared asTree
to permit this file to compile under JDK 20 and earlier. -
nestedPatterns
A list of nested pattern nodes. -
bindingVariables
A list of nested binding variables. This is lazily initialized and should only be accessed bygetBindingVariables()
.
-
-
Constructor Details
-
DeconstructorPatternNode
public DeconstructorPatternNode(TypeMirror type, Tree deconstructorPattern, List<Node> nestedPatterns) Creates aDeconstructorPatternNode
.- Parameters:
type
- the type of the nodedeconstructorPattern
- theDeconstructorPatternTree
nestedPatterns
- a list of nested pattern nodes
-
-
Method Details
-
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
. -
getNestedPatterns
Returns the nested patterns.- Returns:
- the nested patterns
-
accept
Description copied from class:Node
Accept method of the visitor pattern. -
getOperands
Description copied from class:Node
- Specified by:
getOperands
in classNode
- Returns:
- a collection containing all of the operand
Node
s of thisNode
-
getBindingVariables
Return all the binding variables in this pattern.- Returns:
- all the binding variables in this pattern
-