public final class NullnessAnalysis extends Object implements Serializable
Modifier and Type | Method and Description |
---|---|
Nullness |
getNullness(com.sun.source.util.TreePath exprPath,
com.sun.tools.javac.util.Context context)
Returns the
Nullness of the leaf of exprPath . |
static NullnessAnalysis |
instance(com.sun.tools.javac.util.Context context)
Retrieve an instance of
NullnessAnalysis from the context . |
public static NullnessAnalysis instance(com.sun.tools.javac.util.Context context)
NullnessAnalysis
from the context
. If there is no
NullnessAnalysis
currently in the context
, create one, insert it, and return
it.public Nullness getNullness(com.sun.source.util.TreePath exprPath, com.sun.tools.javac.util.Context context)
Nullness
of the leaf of exprPath
.
If the leaf required the compiler to generate autoboxing or autounboxing calls, getNullness
returns the Nullness
after the boxing/unboxing. This implies that,
in those cases, it will always return NONNULL
.
Copyright © 2017. All rights reserved.