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

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

There is a newer version: 4.1.4
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 specifies that the given
 * annotation should be the default for.
 *
 * 
    *
  • a particular location. *
  • a use of a particular type. *
  • a use of a particular kind of type. *
* * @see TypeUseLocation * @see DefaultQualifier * @see DefaultQualifierInHierarchy */ @Documented @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.ANNOTATION_TYPE) public @interface DefaultFor { /** * Returns the locations to which the annotation should be applied. * * @return the locations to which the annotation should be applied */ TypeUseLocation[] value() default {}; /** * Returns {@link TypeKind}s of types for which an annotation should be implicitly added. * * @return {@link TypeKind}s of types for which an annotation should be implicitly added */ TypeKind[] typeKinds() default {}; /** * Returns {@link Class}es for which an annotation should be applied. For example, if * {@code @MyAnno} is meta-annotated with {@code @DefaultFor(classes=String.class)}, then every * occurrence of {@code String} is actually {@code @MyAnno String}. * * @return {@link Class}es for which an annotation should be applied */ Class[] types() default {}; }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy