Annotation Interface RelevantJavaTypes
In order for this annotation to have an effect, it must be placed on the declaration of a
class that extends org.checkerframework.framework.source.SourceChecker.
org.checkerframework.framework.source.SourceChecker#getRelevantJavaTypes collects these
annotations from the checker's class hierarchy, so a subclass inherits and combines the relevant
Java types of its superclasses.
This restriction is coarse-grained in that it applies to all type annotations for a given
checker. To have different restrictions for different Java types, override
org.checkerframework.common.basetype.BaseTypeVisitor#visitAnnotatedType(List, Tree).
This is orthogonal to Java's @Target annotation; each enforces a different type of
restriction on what can be written in source code.
- See the Checker Framework Manual:
- Relevant Java types
-
Required Element Summary
Required Elements
-
Element Details
-
value
Class<?>[] valueClasses where a type annotation supported by this checker may be written.Object[].classmeans that the checker processes all array types. No distinction among array types is currently made, and no other array class should be supplied to@RelevantJavaTypes.If a checker processes both primitive and boxed types, both must be specified separately, for example as
int.classandInteger.class.- Returns:
- classes where a type annotation supported by this checker may be written
-