@Retention(value=RUNTIME) @Target(value=ANNOTATION_TYPE) public @interface ImplicitFor
For example, the Nullable
annotation is annotated
with
@ImplicitFor(trees={Tree.Kind.NULL_LITERAL})to denote that the framework should automatically apply
Nullable
to all instances
of "null."Modifier and Type | Optional Element and Description |
---|---|
String[] |
stringPatterns |
Class<? extends Tree>[] |
treeClasses |
Tree.Kind[] |
trees |
Class<? extends AnnotatedTypeMirror>[] |
typeClasses |
Class<?>[] |
typeNames |
TypeKind[] |
types |
public abstract Tree.Kind[] trees
Tree.Kind
s of trees for which an annotation should be
implicitly addedpublic abstract Class<? extends Tree>[] treeClasses
Class
es of trees for which an annotation should be
implicitly addedpublic abstract TypeKind[] types
TypeKind
s of types for which an annotation should be
implicitly addedpublic abstract Class<? extends AnnotatedTypeMirror>[] typeClasses
Class
es (subtypes of AnnotatedTypeMirror
) of types
for which an annotation should be implicitly addedpublic abstract Class<?>[] typeNames
Class
es (in the actual program) for which an annotation
should be implicitly added.
For example, "java.lang.Void.class" should receive the same annotation
as the null literal.public abstract String[] stringPatterns