Class NullnessAnnotations
java.lang.Object
com.google.errorprone.dataflow.nullnesspropagation.NullnessAnnotations
Utilities to extract
Nullness
from annotations.-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
annotationsAreAmbiguous
(Collection<? extends AnnotationMirror> annotations) static com.google.common.collect.ImmutableList<com.sun.source.tree.AnnotationTree>
annotationsRelevantToNullness
(List<? extends com.sun.source.tree.AnnotationTree> annotations) fromAnnotationMirrors
(List<? extends AnnotationMirror> annotations) fromAnnotationsOn
(com.sun.tools.javac.code.Symbol sym) fromAnnotationsOn
(TypeMirror type) fromAnnotationTrees
(List<? extends com.sun.source.tree.AnnotationTree> annotations) Walks the syntactically enclosing elements of the given element until it finds a defaulting annotation.getUpperBound
(TypeVariable typeVar) Returns any declared or implied bound for the given type variable, meaning this returns any annotation on the given type variable and otherwise returnsfromDefaultAnnotations(javax.lang.model.element.Element)
to find any default in scope of the given type variable.
-
Method Details
-
fromAnnotationTrees
-
fromAnnotationMirrors
public static Optional<Nullness> fromAnnotationMirrors(List<? extends AnnotationMirror> annotations) -
annotationsAreAmbiguous
-
annotationsRelevantToNullness
public static com.google.common.collect.ImmutableList<com.sun.source.tree.AnnotationTree> annotationsRelevantToNullness(List<? extends com.sun.source.tree.AnnotationTree> annotations) -
fromAnnotationsOn
-
fromAnnotationsOn
-
fromDefaultAnnotations
Walks the syntactically enclosing elements of the given element until it finds a defaulting annotation. -
getUpperBound
Returns any declared or implied bound for the given type variable, meaning this returns any annotation on the given type variable and otherwise returnsfromDefaultAnnotations(javax.lang.model.element.Element)
to find any default in scope of the given type variable.
-