@Retention(value=RUNTIME) @Target(value=ANNOTATION_TYPE) public @interface QualifierForLiterals
@QualifierForLiterals
is equivalent to @QualfierForLiterals(LiteralKind.ALL)
Modifier and Type | Optional Element and Description |
---|---|
String[] |
stringPatterns
The type of strings that match these patterns have this qualifier.
|
LiteralKind[] |
value
The kinds of literals whose types have this qualifier.
|
public abstract LiteralKind[] value
@MyAnno
is
meta-annotated with @QualifierForLiterals(LiteralKind.STRING)
, then a literal String
constant such as "hello world"
has type @MyAnno String
, but other
occurrences of String
in the source code are not affected. For String literals, also
see the stringPatterns()
annotation field.public abstract String[] stringPatterns