Annotation Type QualifierForLiterals
-
@Documented @Retention(RUNTIME) @Target(ANNOTATION_TYPE) public @interface QualifierForLiteralsA meta-annotation that indicates what qualifier should be given to literals.@QualifierForLiterals(without any annotation elements) is equivalent to@QualifierForLiterals(LiteralKind.ALL)
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description java.lang.String[]stringPatternsA string literal that matches any of these patterns has this qualifier.LiteralKind[]valueThe kinds of literals whose types have this qualifier.
-
-
-
Element Detail
-
value
LiteralKind[] value
The kinds of literals whose types have this qualifier. For example, if@MyAnnois meta-annotated with@QualifierForLiterals(LiteralKind.STRING), then a literalStringconstant such as"hello world"has type@MyAnno String, but occurrences ofStringin the source code are not affected.For String literals, also see the
stringPatterns()annotation element/field.- Default:
- {}
-
-