@Target(value={TYPE,METHOD,CONSTRUCTOR,PACKAGE}) @Retention(value=SOURCE) public @interface AnnotatedFor
@AnnotatedFor({"nullness", "regex"})
indicates that the class has been annotated with
annotations such as @Nullable
and @Regex
. Has no effect unless the -AuseDefaultsForUncheckedCode=source
command-line argument is supplied.
Ordinarily, the -AuseDefaultsForUncheckedCode=source
command-line argument causes
unannotated locations to be defaulted using unchecked code defaults, and it suppresses all
warnings. However, the -AuseDefaultsForUncheckedCode=source
command-line argument has no
effect on classes with a relevant @AnnotatedFor
annotation: any unannotated location is
defaulted normally (typically using the CLIMB-to-top rule), and typechecking warnings are issued.
@AnnotatedFor
's arguments are any string that may be passed to the -processor
command-line argument: the fully-qualified class name for the checker, or a shorthand for
built-in checkers. Using the annotation with no arguments, as in @AnnotatedFor({})
, has
no effect.
public abstract String[] value
-processor
command-line argument: the
fully-qualified class name for the checker, or a shorthand for built-in checkers.