Class NullnessAnalysis
java.lang.Object
com.google.errorprone.dataflow.nullnesspropagation.NullnessAnalysis
- All Implemented Interfaces:
Serializable
An interface to the nullness analysis.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiongetNullness
(com.sun.source.util.TreePath exprPath, com.sun.tools.javac.util.Context context) Returns theNullness
of the leaf ofexprPath
.static NullnessAnalysis
instance
(com.sun.tools.javac.util.Context context) Retrieve an instance ofNullnessAnalysis
from thecontext
.
-
Method Details
-
instance
Retrieve an instance ofNullnessAnalysis
from thecontext
. If there is noNullnessAnalysis
currently in thecontext
, create one, insert it, and return it. -
getNullness
public Nullness getNullness(com.sun.source.util.TreePath exprPath, com.sun.tools.javac.util.Context context) Returns theNullness
of the leaf ofexprPath
.If the leaf required the compiler to generate autoboxing or autounboxing calls,
getNullness
returns theNullness
after the boxing/unboxing. This implies that, in those cases, it will always returnNONNULL
.
-