Class DataFlow
java.lang.Object
com.google.errorprone.dataflow.DataFlow
Provides a wrapper around
Analysis
.- Author:
- konne@google.com (Konstantin Weitz)
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
DataFlow.Result<A extends org.checkerframework.errorprone.dataflow.analysis.AbstractValue<A>,
S extends org.checkerframework.errorprone.dataflow.analysis.Store<S>, T extends org.checkerframework.errorprone.dataflow.analysis.TransferFunction<A, S>> A pair of Analysis and ControlFlowGraph. -
Method Summary
Modifier and TypeMethodDescriptionstatic <A extends org.checkerframework.errorprone.dataflow.analysis.AbstractValue<A>,
S extends org.checkerframework.errorprone.dataflow.analysis.Store<S>, T extends org.checkerframework.errorprone.dataflow.analysis.ForwardTransferFunction<A, S>>
@Nullable AexpressionDataflow
(com.sun.source.util.TreePath exprPath, com.sun.tools.javac.util.Context context, T transfer) Runs thetransfer
dataflow analysis to compute the abstract value of the expression which is the leaf ofexprPath
.
-
Method Details
-
expressionDataflow
public static <A extends org.checkerframework.errorprone.dataflow.analysis.AbstractValue<A>,S extends org.checkerframework.errorprone.dataflow.analysis.Store<S>, @Nullable A expressionDataflowT extends org.checkerframework.errorprone.dataflow.analysis.ForwardTransferFunction<A, S>> (com.sun.source.util.TreePath exprPath, com.sun.tools.javac.util.Context context, T transfer) Runs thetransfer
dataflow analysis to compute the abstract value of the expression which is the leaf ofexprPath
.The expression must be part of a method, lambda, or initializer (inline field initializer or initializer block). Example of an expression outside of such constructs is the identifier in an import statement.
Note that for initializers, each inline field initializer or initializer block is treated separately. I.e., we don't merge all initializers into one virtual block for dataflow.
- Returns:
- dataflow result for the given expression or
null
if the expression is not part of a method, lambda or initializer
-