public class SwitchExpressionNode extends Node
Constructor and Description |
---|
SwitchExpressionNode(TypeMirror type,
Tree switchExpressionTree,
LocalVariableNode switchExpressionVar)
Creates a new SwitchExpressionNoode.
|
Modifier and Type | Method and Description |
---|---|
<R,P> R |
accept(NodeVisitor<R,P> visitor,
P p)
Accept method of the visitor pattern.
|
boolean |
equals(@Nullable Object obj) |
Collection<Node> |
getOperands()
|
LocalVariableNode |
getSwitchExpressionVar()
This is a variable created by dataflow to which each result expression of the switch expression
is assigned.
|
Tree |
getTree()
Returns the
Tree in the abstract syntax tree, or null if no corresponding tree
exists. |
int |
hashCode() |
String |
toString() |
getBlock, getInSource, getTransitiveOperands, getType, getUid, isLValue, nodeCollectionToString, setBlock, setInSource, setLValue, toStringDebug
public SwitchExpressionNode(TypeMirror type, Tree switchExpressionTree, LocalVariableNode switchExpressionVar)
type
- the type of the nodeswitchExpressionTree
- the SwitchExpressionTree
for this nodeswitchExpressionVar
- a variable created by dataflow to which each result expression of
the switch expression is assigned. Its value should be used for the value of the switch
expressionpublic Tree getTree()
Node
Tree
in the abstract syntax tree, or null
if no corresponding tree
exists. For instance, this is the case for an ImplicitThisNode
.public LocalVariableNode getSwitchExpressionVar()
public <R,P> R accept(NodeVisitor<R,P> visitor, P p)
Node
public Collection<Node> getOperands()
Node
getOperands
in class Node
Node
s of this Node