Enum Class TypeUseLocation
- All Implemented Interfaces:
Serializable
,Comparable<TypeUseLocation>
,Constable
Specifies the locations to which a
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 Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionApply default annotations to all type uses other than uses of type parameters.Apply default annotations to all unannotated raw types of constructor result types.Apply default annotations to all unannotated raw types of exception parameters.Apply default annotations to unannotated, but explicit lower bounds:<? super Object>
Apply default annotations to unannotated, but explicit upper bounds:<T extends Object>
.Apply default annotations to all unannotated raw types of fields.Apply default annotations to unannotated, but implicit lower bounds:<T>
<?>
.Apply default annotations to unannotated type variables:<T>
.Apply default annotations to all unannotated raw types of local variables, casts, and instanceof.Apply default annotations to unannotated lower bounds for type variables and wildcards both explicit ones inextends
clauses, and implicit upper bounds when no explicitextends
orsuper
clause is present.Apply if nothing more concrete is provided.Apply default annotations to all unannotated raw types of formal parameter types, excluding the receiver.Apply default annotations to all unannotated raw types of receiver types.Apply default annotations to all unannotated raw types of resource variables.Apply default annotations to all unannotated raw types of return types.Apply default annotations to unannotated upper bounds: both explicit ones inextends
clauses, and implicit upper bounds when no explicitextends
orsuper
clause is present. -
Method Summary
Modifier and TypeMethodDescriptionstatic TypeUseLocation
Returns the enum constant of this class with the specified name.static TypeUseLocation[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
FIELD
Apply default annotations to all unannotated raw types of fields. -
LOCAL_VARIABLE
Apply default annotations to all unannotated raw types of local variables, casts, and instanceof. -
RESOURCE_VARIABLE
Apply default annotations to all unannotated raw types of resource variables. -
EXCEPTION_PARAMETER
Apply default annotations to all unannotated raw types of exception parameters. -
RECEIVER
Apply default annotations to all unannotated raw types of receiver types. -
PARAMETER
Apply default annotations to all unannotated raw types of formal parameter types, excluding the receiver. -
RETURN
Apply default annotations to all unannotated raw types of return types. -
CONSTRUCTOR_RESULT
Apply default annotations to all unannotated raw types of constructor result types. -
LOWER_BOUND
Apply default annotations to unannotated lower bounds for type variables and wildcards both explicit ones inextends
clauses, and implicit upper bounds when no explicitextends
orsuper
clause is present. -
EXPLICIT_LOWER_BOUND
Apply default annotations to unannotated, but explicit lower bounds:<? super Object>
-
IMPLICIT_LOWER_BOUND
Apply default annotations to unannotated, but implicit lower bounds:<T>
<?>
. -
UPPER_BOUND
Apply default annotations to unannotated upper bounds: both explicit ones inextends
clauses, and implicit upper bounds when no explicitextends
orsuper
clause is present.Especially useful for parametrized classes that provide a lot of static methods with the same generic parameters as the class.
-
EXPLICIT_UPPER_BOUND
Apply default annotations to unannotated, but explicit upper bounds:<T extends Object>
. -
IMPLICIT_UPPER_BOUND
Apply default annotations to unannotated type variables:<T>
. -
OTHERWISE
Apply if nothing more concrete is provided. TODO: clarify relation to ALL. -
ALL
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.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-