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.
  • Field Details

    • tree

      protected final ExpressionTree tree
      Tree for the lambda expression body.
    • result

      protected final Node result
      Final CFG node corresponding to the lambda expression body.
  • Constructor Details

    • LambdaResultExpressionNode

      public LambdaResultExpressionNode(ExpressionTree t, Node result)
      Creates a LambdaResultExpressionNode.
      Parameters:
      t - tree for the lambda expression body
      result - final CFG node corresponding to the lambda expression body
  • Method Details

    • getResult

      public Node getResult()
      Returns the final node of the CFG corresponding to the lambda expression body (see getTree()).
      Returns:
      the final node of the CFG corresponding to the lambda expression body
    • getTree

      public ExpressionTree getTree()
      Returns the ExpressionTree 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).
      Specified by:
      getTree in class Node
      Returns:
      the ExpressionTree corresponding to the body of a lambda expression with an expression body
    • accept

      public <R, P> R accept(NodeVisitor<R,P> visitor, P p)
      Description copied from class: Node
      Accept method of the visitor pattern.
      Specified by:
      accept in class Node
      Type Parameters:
      R - result type of the operation
      P - parameter type
      Parameters:
      visitor - the visitor to be applied to this node
      p - the parameter for this operation
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(@Nullable Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • getOperands

      @SideEffectFree public Collection<Node> getOperands()
      Description copied from class: Node
      Returns a collection containing all of the operand Nodes of this Node.
      Specified by:
      getOperands in class Node
      Returns:
      a collection containing all of the operand Nodes of this Node