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(TreePath exprPath, com.sun.tools.javac.util.Context context) Returns theNullnessof the leaf ofexprPath.static NullnessAnalysisinstance(com.sun.tools.javac.util.Context context) Retrieve an instance ofNullnessAnalysisfrom thecontext.
-
Method Details
-
instance
Retrieve an instance ofNullnessAnalysisfrom thecontext. If there is noNullnessAnalysiscurrently in thecontext, create one, insert it, and return it. -
getNullness
Returns theNullnessof the leaf ofexprPath.If the leaf required the compiler to generate autoboxing or autounboxing calls,
getNullnessreturns theNullnessafter the boxing/unboxing. This implies that, in those cases, it will always returnNONNULL.
-