Class DataFlowNode
java.lang.Object
org.openrewrite.analysis.dataflow.DataFlowNode
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract fj.data.Option<org.openrewrite.analysis.trait.expr.Expr> asExpr()<E extends org.openrewrite.analysis.trait.expr.Expr>
fj.data.Option<E> <E extends org.openrewrite.analysis.trait.expr.ExprParent>
fj.data.Option<E> asExprParent(Class<E> clazz) abstract fj.data.Option<org.openrewrite.analysis.trait.variable.Parameter> booleanisExpr()booleanstatic fj.data.Option<DataFlowNode> of(org.openrewrite.Cursor cursor) static DataFlowNodeofOrThrow(org.openrewrite.Cursor cursor) LikeofOrThrow(Cursor, String)but builds the failure message lazily.static DataFlowNode
-
Constructor Details
-
DataFlowNode
public DataFlowNode()
-
-
Method Details
-
asExpr
public abstract fj.data.Option<org.openrewrite.analysis.trait.expr.Expr> asExpr() -
asExpr
public <E extends org.openrewrite.analysis.trait.expr.Expr> fj.data.Option<E> asExpr(Class<E> clazz) -
asExprParent
public <E extends org.openrewrite.analysis.trait.expr.ExprParent> fj.data.Option<E> asExprParent(Class<E> clazz) -
asParameter
public abstract fj.data.Option<org.openrewrite.analysis.trait.variable.Parameter> asParameter() -
isParameter
public boolean isParameter() -
isExpr
public boolean isExpr() -
of
-
ofOrThrow
-
ofOrThrow
LikeofOrThrow(Cursor, String)but builds the failure message lazily. The hot data-flow traversal calls this on every candidate node and never actually throws here; eagerly concatenatingcursor(whoseCursor.toString()prints the enclosing tree) dominated allocation, so the message is only constructed on the never-taken failure path.
-