Annotation Type AnnotatedFor
-
@Documented @Retention(SOURCE) @Target({TYPE,METHOD,CONSTRUCTOR,PACKAGE}) public @interface AnnotatedFor
Indicates that this class has been annotated for the given type system. For example,@AnnotatedFor({"nullness", "regex"})indicates that the class has been annotated with annotations such as@Nullableand@Regex.You should only use this annotation in a partially-annotated library. There is no point to using it in a fully-annotated library nor in an application that does not export APIs for clients.
This annotation has no effect unless the
-AuseConservativeDefaultsForUncheckedCode=sourcecommand-line argument is supplied. Ordinarily, the-AuseConservativeDefaultsForUncheckedCode=sourcecommand-line argument causes unannotated locations to be defaulted using conservative defaults, and it suppresses all warnings. However, a class with a relevant@AnnotatedForannotation is always defaulted normally (typically using the CLIMB-to-top rule), and typechecking warnings are issued.
-
-
Element Detail
-
value
String[] value
Returns the type systems for which the class has been annotated. Legal arguments are any string that may be passed to the-processorcommand-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.- Returns:
- the type systems for which the class has been annotated
-
-