@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 |
---|---|
java.lang.String[] |
stringPatterns |
java.lang.Class<? extends com.sun.source.tree.Tree>[] |
treeClasses |
com.sun.source.tree.Tree.Kind[] |
trees |
java.lang.Class<? extends AnnotatedTypeMirror>[] |
typeClasses |
java.lang.Class<?>[] |
typeNames |
javax.lang.model.type.TypeKind[] |
types |
public abstract com.sun.source.tree.Tree.Kind[] trees
Tree.Kind
s of trees for which an annotation should be
implicitly addedpublic abstract java.lang.Class<? extends com.sun.source.tree.Tree>[] treeClasses
Class
es of trees for which an annotation should be
implicitly addedpublic abstract javax.lang.model.type.TypeKind[] types
TypeKind
s of types for which an annotation should be
implicitly addedpublic abstract java.lang.Class<? extends AnnotatedTypeMirror>[] typeClasses
Class
es (subtypes of AnnotatedTypeMirror
) of types
for which an annotation should be implicitly added