|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |
@Documented @Retention(value=RUNTIME) @Target(value=TYPE) public @interface TypeQualifiers
An annotation that lists the type qualifiers supported by the annotated
Checker
.
Example:
@TypeQualifiers( { Nullable.class, NonNull.class } ) public class NullnessChecker extends BaseTypeChecker { ... }The checker reflectively queries this annotation, and subsequently the meta-annotations on the annotations in the list, to form the result of
BaseTypeChecker.getSupportedTypeQualifiers()
construct the type
qualifier hierarchy. The framework also uses this annotation to determine
which annotations may be added to an AnnotatedTypeMirror
(an
annotation may be added if and only if it is a TypeQualifier
and it
appears in in the list of supported annotations from TypeQualifiers
).
This annotation differs from SupportedAnnotationTypes
in that it
simply lists the annotations that a processor (checker) recognizes -- any
annotations not in the list should be ignored, but files lacking these
annotations should still be processed. SupportedAnnotationTypes
, on
the other hand, instructs the compiler to skip processing of any file that
does not contain any supported annotations.
Another difference is that SupportedAnnotationTypes
's argument is an
array of strings, whereas TypeQualifiers
's argument is an array of
classes. The former supports the use of "*" for specifying multiple
annotations (which is less important for TypeQualifiers
than for
SupportedAnnotationTypes
), while the latter permits type-checking,
refactoring by IDEs, etc.
BaseTypeChecker.getSupportedTypeQualifiers()
Modifier and Type | Required Element and Description |
---|---|
Class<? extends Annotation>[] |
value
The type qualifier annotations supported by the annotated Checker . |
Element Detail |
---|
public abstract Class<? extends Annotation>[] value
Checker
.
The checker may also support other, non-type-qualifier, annotations.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |