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

framework.src.org.checkerframework.framework.qual.AnnotatedFor 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.42.0
Show newest version
package org.checkerframework.framework.qual;

import static java.lang.annotation.ElementType.PACKAGE;
import static java.lang.annotation.ElementType.TYPE;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.ElementType.CONSTRUCTOR;

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

/**
 * Indicates that this class has been annotated for the given type system.
 * For example, @AnnotatedFor({"nullness", "regex"}) indicates
 * that the class has been annotated with annotations such as
 * @Nullable and @Regex.  Has no effect unless the
 * -AuseDefaultsForUncheckedCode=source command-line argument
 * is supplied.
 * 

* * Ordinarily, the -AuseDefaultsForUncheckedCode=source command-line argument * causes unannotated locations to be defaulted using unchecked code defaults, * and it suppresses all warnings. However, the * -AuseDefaultsForUncheckedCode=source command-line argument has no effect on * classes with a relevant @AnnotatedFor annotation: any * unannotated location is defaulted normally (typically using the * CLIMB-to-top rule), and typechecking warnings are issued. *

* * @AnnotatedFor's arguments are any string that may be passed * to the -processor command-line argument: the fully-qualified * class name for the checker, or a shorthand for built-in checkers. Using * the annotation with no arguments, as in * @AnnotatedFor({}), has no effect. * * @checker_framework.manual #compiling-libraries Compiling partially-annotated libraries */ @Target({TYPE, METHOD, CONSTRUCTOR, PACKAGE}) @Retention(RetentionPolicy.SOURCE) public @interface AnnotatedFor { /** * @return the type systems for which the class has been annotated. * Legal arguments are any string that may be passed to the * -processor command-line argument: the fully-qualified * class name for the checker, or a shorthand for built-in checkers. * @checker_framework.manual #shorthand-for-checkers Short names for built-in checkers */ String[] value(); }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy