Class DataFlow

java.lang.Object
com.google.errorprone.dataflow.DataFlow

public final class DataFlow extends Object
Provides a wrapper around Analysis.
Author:
konne@google.com (Konstantin Weitz)
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static 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 Type
    Method
    Description
    static <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>>
    A
    expressionDataflow(com.sun.source.util.TreePath exprPath, com.sun.tools.javac.util.Context context, T transfer)
    Runs the transfer dataflow analysis to compute the abstract value of the expression which is the leaf of exprPath.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • expressionDataflow

      @Nullable public static <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>> A expressionDataflow(com.sun.source.util.TreePath exprPath, com.sun.tools.javac.util.Context context, T transfer)
      Runs the transfer dataflow analysis to compute the abstract value of the expression which is the leaf of exprPath.

      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