Class LambdaResultExpressionNode
- java.lang.Object
-
- org.checkerframework.dataflow.cfg.node.Node
-
- org.checkerframework.dataflow.cfg.node.LambdaResultExpressionNode
-
- All Implemented Interfaces:
org.plumelib.util.UniqueId
public class LambdaResultExpressionNode extends Node
A node for the single expression body of a single-expression lambda.
-
-
Constructor Summary
Constructors Constructor Description LambdaResultExpressionNode(com.sun.source.tree.ExpressionTree t, Node result)
Creates a LambdaResultExpressionNode.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <R,P>
Raccept(NodeVisitor<R,P> visitor, P p)
Accept method of the visitor pattern.boolean
equals(@Nullable java.lang.Object obj)
java.util.Collection<Node>
getOperands()
Node
getResult()
Returns the final node of the CFG corresponding to the lambda expression body (seegetTree()
).com.sun.source.tree.ExpressionTree
getTree()
Returns theExpressionTree
corresponding to the body of a lambda expression with an expression body (e.g.int
hashCode()
java.lang.String
toString()
-
Methods inherited from class org.checkerframework.dataflow.cfg.node.Node
getBlock, getInSource, getTransitiveOperands, getType, getUid, isLValue, nodeCollectionToString, setBlock, setInSource, setLValue, toStringDebug
-
-
-
-
Field Detail
-
tree
protected final com.sun.source.tree.ExpressionTree tree
Tree for the lambda expression body.
-
result
protected final Node result
Final CFG node corresponding to the lambda expression body.
-
-
Constructor Detail
-
LambdaResultExpressionNode
public LambdaResultExpressionNode(com.sun.source.tree.ExpressionTree t, Node result)
Creates a LambdaResultExpressionNode.- Parameters:
t
- tree for the lambda expression bodyresult
- final CFG node corresponding to the lambda expression body
-
-
Method Detail
-
getResult
public Node getResult()
Returns the final node of the CFG corresponding to the lambda expression body (seegetTree()
).- Returns:
- the final node of the CFG corresponding to the lambda expression body
-
getTree
public com.sun.source.tree.ExpressionTree getTree()
Returns theExpressionTree
corresponding to the body of a lambda expression with an expression body (e.g. X for (o -> X
) where X is an expression and not a {...} block).
-
accept
public <R,P> R accept(NodeVisitor<R,P> visitor, P p)
Description copied from class:Node
Accept method of the visitor pattern.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
equals
public boolean equals(@Nullable java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
getOperands
@SideEffectFree public java.util.Collection<Node> getOperands()
Description copied from class:Node
- Specified by:
getOperands
in classNode
- Returns:
- a collection containing all of the operand
Node
s of thisNode
-
-