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

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

Go to download

The Checker Framework enhances Java's type system to make it more powerful and useful. This lets software developers detect and prevent errors in their Java programs. The Checker Framework includes compiler plug-ins ("checkers") that find bugs or verify their absence. It also permits you to write your own compiler plug-ins.

There is a newer version: 3.43.0
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 applied to the declaration of a type qualifier. It specifies that the
 * annotation should be the upper bound for
 *
 * 
    *
  • all uses of a particular type, and *
  • all uses of a particular kind of type. *
* * An example is the declaration * *

 * {@literal @}DefaultFor(classes=String.class)
 * {@literal @}interface MyAnno {}
 * 
* *

The upper bound applies to every occurrence of the given classes and also to every occurrence * of the given type kinds. * * @checker_framework.manual #upper-bound-for-use Upper bound of qualifiers on uses of a given type */ @Documented @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.ANNOTATION_TYPE) public @interface UpperBoundFor { /** * Returns {@link TypeKind}s of types that get an upper bound. The meta-annotated annotation is * the upper bound. * * @return {@link TypeKind}s of types that get an upper bound */ TypeKind[] typeKinds() default {}; /** * Returns {@link Class}es that should get an upper bound. The meta-annotated annotation is the * upper bound. * * @return {@link Class}es that get an upper bound */ Class[] types() default {}; }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy