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

framework.src.org.checkerframework.framework.qual.TypeUseLocation 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;

/**
 * Specifies the locations to which a {@link DefaultQualifier} annotation applies.
 *
 * The order of enums is important. Defaults are applied in this order.
 * In particular, this means that OTHERWISE and ALL should be last.
 *
 * @see DefaultQualifier
 * @see javax.lang.model.element.ElementKind
 */
public enum TypeUseLocation {

    /**
     * Apply default annotations to all unannotated raw types
     * of fields.
     */
    FIELD,

    /**
     * Apply default annotations to all unannotated raw types
     * of local variables, casts, and instanceof.
     * 

* TODO: should cast/instanceof be separated? */ LOCAL_VARIABLE, /** * Apply default annotations to all unannotated raw types * of resource variables. */ RESOURCE_VARIABLE, /** * Apply default annotations to all unannotated raw types * of exception parameters. */ EXCEPTION_PARAMETER, /** * Apply default annotations to all unannotated raw types * of receiver types. */ RECEIVER, /** * Apply default annotations to all unannotated raw types * of formal parameter types. */ PARAMETER, /** * Apply default annotations to all unannotated raw types * of return types. */ RETURN, /** * Apply default annotations to unannotated lower bounds * for type variables and wildcards both explicit ones in * extends clauses, and implicit upper bounds * when no explicit extends or super * clause is present */ LOWER_BOUND, /** * Apply default annotations to unannotated, but explicit lower bounds: * <? super Object> * */ EXPLICIT_LOWER_BOUND, /** * Apply default annotations to unannotated, but implicit lower bounds: * <T> * <?> */ IMPLICIT_LOWER_BOUND, /** * Apply default annotations to unannotated upper bounds: both * explicit ones in extends clauses, and implicit upper bounds * when no explicit extends or super clause is * present. * * Especially useful for parametrized classes that provide a lot of * static methods with the same generic parameters as the class. * * TODO: more doc, relation to other UPPER_BOUND */ UPPER_BOUND, /** * Apply default annotations to unannotated, but explicit upper bounds: * <T extends Object> * * TODO: more doc, relation to other UPPER_BOUND */ EXPLICIT_UPPER_BOUND, /** * Apply default annotations to unannotated type variables: * <T> * * TODO: more doc, relation to other UPPER_BOUND */ IMPLICIT_UPPER_BOUND, /** * Apply if nothing more concrete is provided. * TODO: clarify relation to ALL. */ OTHERWISE, /** * Apply default annotations to all type uses other than uses of type parameters. * Does not allow any of the other constants. Usually you want OTHERWISE. */ ALL; }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy