All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.checkerframework.framework.qual.QualifierForLiterals Maven / Gradle / Ivy

Go to download

Guava is a suite of core and expanded libraries that include utility classes, google's collections, io classes, and much much more.

There is a newer version: 62
Show newest version
package org.checkerframework.framework.qual;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * A meta-annotation that indicates what qualifier should be given to literals.
 * {@code @QualifierForLiterals} is equivalent to {@code @QualfierForLiterals(LiteralKind.ALL)}
 */
@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.ANNOTATION_TYPE)
public @interface QualifierForLiterals {
    /**
     * The kinds of literals whose types have this qualifier. For example, if {@code @MyAnno} is
     * meta-annotated with {@code @QualifierForLiterals(LiteralKind.STRING)}, then a literal {@code
     * String} constant such as {@code "hello world"} has type {@code @MyAnno String}, but
     * occurrences of {@code String} in the source code are not affected.
     *
     * 

For String literals, also see the {@link #stringPatterns} annotation element/field. */ LiteralKind[] value() default {}; /** * A string literal that matches any of these patterns has this qualifier. * *

If patterns for multiple qualifers match, then the string literal is given the greatest * lower bound of all the matches. */ String[] stringPatterns() default {}; }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy