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

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

There is a newer version: 4.1.2
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 class, interface, and Enum declarations. */ TYPE_DECLARATION, /** 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 all unannotated raw types of constructor result types. */ CONSTRUCTOR_RESULT, /** * Apply default annotations to unannotated lower bounds for type variables and wildcards both * explicit ones in {@code extends} clauses, and implicit upper bounds when no explicit {@code * extends} or {@code super} clause is present. */ LOWER_BOUND, /** * Apply default annotations to unannotated, but explicit lower bounds: {@code } */ EXPLICIT_LOWER_BOUND, /** * Apply default annotations to unannotated, but implicit lower bounds: {@code } {@code }. */ IMPLICIT_LOWER_BOUND, /** * Apply default annotations to unannotated upper bounds: both explicit ones in {@code extends} * clauses, and implicit upper bounds when no explicit {@code extends} or {@code 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: {@code }. * *

TODO: more doc, relation to other UPPER_BOUND */ EXPLICIT_UPPER_BOUND, /** * Apply default annotations to unannotated type variables: {@code }. * *

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