Top Description Methods
org.checkerframework.framework.qual

public @Interface QualifierForLiterals

extends Annotation
Annotations
@Documented
@Retention:RUNTIME
@Target:ANNOTATION_TYPE
Imports
java.lang.annotation.Documented, .ElementType, .Retention, .RetentionPolicy, .Target

A meta-annotation that indicates what qualifier should be given to literals. @QualifierForLiterals (without any annotation elements) is equivalent to @QualifierForLiterals(LiteralKind.ALL)

Method Summary

Modifier and TypeMethod and Description
public String[]
stringPatterns()

A string literal that matches any of these patterns has this qualifier.

public LiteralKind[]
value()

The kinds of literals whose types have this qualifier.

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Method Detail

stringPatternsback to summary
public String[] stringPatterns()

A string literal that matches any of these patterns has this qualifier.

If patterns for multiple qualifiers match, then the string literal is given the greatest lower bound of all the matches.

valueback to summary
public LiteralKind[] value()

The kinds of literals whose types have this qualifier. For example, if @MyAnno is meta-annotated with @QualifierForLiterals(LiteralKind.STRING), then a literal String constant such as "hello world" has type @MyAnno String, but occurrences of String in the source code are not affected.

For String literals, also see the stringPatterns annotation element/field.