Class TypeQualifierResolver
java.lang.Object
edu.umd.cs.findbugs.ba.jsr305.TypeQualifierResolver
Resolve annotations into type qualifiers.
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final ClassDescriptor(package private) static final ClassDescriptorprivate static final ClassDescriptor[]private static final ClassDescriptor[](package private) static final ClassDescriptor(package private) static final ClassDescriptor(package private) static final ClassDescriptor -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidprivate static voidresolveTypeQualifierDefaults(AnnotationValue value, ElementType defaultFor, LinkedList<AnnotationValue> result) Resolve an annotation into AnnotationValues representing any type qualifier(s) the annotation resolves to.static Collection<AnnotationValue> resolveTypeQualifierDefaults(Collection<AnnotationValue> values, ElementType elementType) Resolve collection of AnnotationValues (which have been used to annotate an AnnotatedObject or method parameter) into collection of resolved type qualifier AnnotationValues.private static voidresolveTypeQualifierNicknames(AnnotationValue value, LinkedList<AnnotationValue> result, LinkedList<ClassDescriptor> onStack) Resolve an annotation into AnnotationValues representing any type qualifier(s) the annotation resolves to.static Collection<AnnotationValue> Resolve an AnnotationValue into a list of AnnotationValues representing type qualifier annotations.static Collection<AnnotationValue> Resolve collection of AnnotationValues (which have been used to annotate an AnnotatedObject or method parameter) into collection of resolved type qualifier AnnotationValues.
-
Field Details
-
typeQualifier
-
typeQualifierNickname
-
typeQualifierDefault
-
elementTypeDescriptor
-
eclipseNonNullByDefault
-
NON_NULL_CLASS_DESCRIPTORS
-
NULLABLE_CLASS_DESCRIPTORS
-
-
Constructor Details
-
TypeQualifierResolver
public TypeQualifierResolver()
-
-
Method Details
-
resolveTypeQualifiers
Resolve an AnnotationValue into a list of AnnotationValues representing type qualifier annotations.- Parameters:
value- AnnotationValue representing the use of an annotation- Returns:
- Collection of AnnotationValues representing resolved TypeQualifier annotations
-
resolveTypeQualifierDefaults
public static Collection<AnnotationValue> resolveTypeQualifierDefaults(Collection<AnnotationValue> values, ElementType elementType) Resolve collection of AnnotationValues (which have been used to annotate an AnnotatedObject or method parameter) into collection of resolved type qualifier AnnotationValues.- Parameters:
values- Collection of AnnotationValues used to annotate an AnnotatedObject or method parameter- Returns:
- Collection of resolved type qualifier AnnotationValues
-
resolveTypeQualifierNicknames
private static void resolveTypeQualifierNicknames(AnnotationValue value, LinkedList<AnnotationValue> result, LinkedList<ClassDescriptor> onStack) Resolve an annotation into AnnotationValues representing any type qualifier(s) the annotation resolves to. Detects annotations which are directly marked as TypeQualifier annotations, and also resolves the use of TypeQualifierNickname annotations.- Parameters:
value- AnnotationValue representing the use of an annotationresult- LinkedList containing resolved type qualifier AnnotationValuesonStack- stack of annotations being processed; used to detect cycles in type qualifier nicknames
-
logMissingAnnotationClass
-
resolveTypeQualifiers
Resolve collection of AnnotationValues (which have been used to annotate an AnnotatedObject or method parameter) into collection of resolved type qualifier AnnotationValues.- Parameters:
values- Collection of AnnotationValues used to annotate an AnnotatedObject or method parameter- Returns:
- Collection of resolved type qualifier AnnotationValues
-
resolveTypeQualifierDefaults
private static void resolveTypeQualifierDefaults(AnnotationValue value, ElementType defaultFor, LinkedList<AnnotationValue> result) Resolve an annotation into AnnotationValues representing any type qualifier(s) the annotation resolves to. Detects annotations which are directly marked as TypeQualifier annotations, and also resolves the use of TypeQualifierNickname annotations.- Parameters:
value- AnnotationValue representing the use of an annotationresult- LinkedList containing resolved type qualifier AnnotationValues
-