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
FieldsModifier and TypeFieldDescriptionprotected @MonotonicNonNull List<LocalVariableNode> A list of nested binding variables.protected final TreeTheDeconstructorPatternTree, declared asTreeto permit this file to compile under JDK 20 and earlier.A list of nested pattern nodes. -
Constructor Summary
ConstructorsConstructorDescriptionDeconstructorPatternNode(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.Returns all the binding variables in this pattern.Returns the nested patterns.getTree()Returns theTreein the abstract syntax tree, ornullif no corresponding tree exists.toString()Methods inherited from class org.checkerframework.dataflow.cfg.node.Node
getBlock, getInSource, getTransitiveOperands, getType, getUid, isLValue, nodeCollectionToString, setBlock, setInSource, setLValue, toStringDebugMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.plumelib.util.UniqueId
getClassAndUid
-
Field Details
-
deconstructorPattern
TheDeconstructorPatternTree, declared asTreeto 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- theDeconstructorPatternTreenestedPatterns- a list of nested pattern nodes
-
-
Method Details
-
getTree
Description copied from class:NodeReturns theTreein the abstract syntax tree, ornullif 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:NodeAccept method of the visitor pattern. -
getOperands
Description copied from class:Node- Specified by:
getOperandsin classNode- Returns:
- a collection containing all of the operand
Nodes of thisNode
-
getBindingVariables
Returns all the binding variables in this pattern.- Returns:
- all the binding variables in this pattern
-
toString
-