Enum Class TypeAnnotation.TargetType
- All Implemented Interfaces:
- Serializable,- Comparable<TypeAnnotation.TargetType>,- Constable
- Enclosing interface:
- TypeAnnotation
The kind of target on which the annotation appears, as defined in JVMS 4.7.20.1.
- Since:
- 24
- See Also:
- 
Nested Class SummaryNested classes/interfaces declared in class java.lang.EnumEnum.EnumDesc<E extends Enum<E>>
- 
Enum Constant SummaryEnum ConstantsEnum ConstantDescriptionFor annotations on a typecast.For annotations on the type of an "extends" or "implements" clause.For annotations on a class type parameter declaration.For annotations on a bound of a type parameter of a class.For annotations on a type argument of an object creation expression.For annotations on a constructor reference receiver.For annotations on a type argument of a constructor reference.For annotations on an exception parameter.For annotations on a field.For annotations on a type test.For annotations on a local variable.For annotations on a method parameter.For annotations on a type argument of a method call.For annotations on the method receiver.For annotations on a method reference receiver.For annotations on a type argument of a method reference.For annotations on a method return type.For annotations on a method type parameter declaration.For annotations on a bound of a type parameter of a method.For annotations on an object creation expression.For annotations on a resource variable.For annotations on a throws clause in a method declaration.
- 
Method SummaryModifier and TypeMethodDescriptionintReturns the size of the target type if fixed or -1 if variable.intReturns the target type value.static TypeAnnotation.TargetTypeReturns the enum constant of this class with the specified name.static TypeAnnotation.TargetType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
- 
Enum Constant Details- 
CLASS_TYPE_PARAMETERFor annotations on a class type parameter declaration.
- 
METHOD_TYPE_PARAMETERFor annotations on a method type parameter declaration.
- 
CLASS_EXTENDSFor annotations on the type of an "extends" or "implements" clause.
- 
CLASS_TYPE_PARAMETER_BOUNDFor annotations on a bound of a type parameter of a class.
- 
METHOD_TYPE_PARAMETER_BOUNDFor annotations on a bound of a type parameter of a method.
- 
FIELDFor annotations on a field.
- 
METHOD_RETURNFor annotations on a method return type.
- 
METHOD_RECEIVERFor annotations on the method receiver.
- 
METHOD_FORMAL_PARAMETERFor annotations on a method parameter.
- 
THROWSFor annotations on a throws clause in a method declaration.
- 
LOCAL_VARIABLEFor annotations on a local variable.
- 
RESOURCE_VARIABLEFor annotations on a resource variable.
- 
EXCEPTION_PARAMETERFor annotations on an exception parameter.
- 
INSTANCEOFFor annotations on a type test.
- 
NEWFor annotations on an object creation expression.
- 
CONSTRUCTOR_REFERENCEFor annotations on a constructor reference receiver.
- 
METHOD_REFERENCEFor annotations on a method reference receiver.
- 
CASTFor annotations on a typecast.
- 
CONSTRUCTOR_INVOCATION_TYPE_ARGUMENTFor annotations on a type argument of an object creation expression.
- 
METHOD_INVOCATION_TYPE_ARGUMENTFor annotations on a type argument of a method call.
- 
CONSTRUCTOR_REFERENCE_TYPE_ARGUMENTFor annotations on a type argument of a constructor reference.
- 
METHOD_REFERENCE_TYPE_ARGUMENTFor annotations on a type argument of a method reference.
 
- 
- 
Method Details- 
valuesReturns 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
 
- 
valueOfReturns 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 name
- NullPointerException- if the argument is null
 
- 
targetTypeValuepublic int targetTypeValue()Returns the target type value.- API Note:
- TARGET_-prefixed constants in- TypeAnnotation.TargetInfo, such as- TypeAnnotation.TargetInfo.TARGET_CLASS_TYPE_PARAMETER, describe the possible return values of this method.
- Returns:
- the target type value
 
- 
sizeIfFixedpublic int sizeIfFixed()Returns the size of the target type if fixed or -1 if variable.- Returns:
- the size of the target type if fixed or -1 if variable
 
 
-