Interface TypeAnnotation.TypePathComponent
- Enclosing interface:
- TypeAnnotation
public static sealed interface TypeAnnotation.TypePathComponent
JVMS: Type_path structure identifies which part of the type is annotated,
 as defined in JVMS 4.7.20.2
- Since:
- 24
- See Also:
- 
Nested Class SummaryNested Classes
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final TypeAnnotation.TypePathComponentstatic instance for annotation is deeper in an array typestatic final TypeAnnotation.TypePathComponentstatic instance for annotation is deeper in a nested typestatic final TypeAnnotation.TypePathComponentstatic instance for annotation is on the bound of a wildcard type argument of a parameterized type
- 
Method SummaryModifier and TypeMethodDescriptionof(TypeAnnotation.TypePathComponent.Kind typePathKind, int typeArgumentIndex) Returns type path component of an annotation.intJVMS: type_argument_index If the value of the type_path_kind item is 0, 1, or 2, then the value of the type_argument_index item is 0.The type path kind items from JVMS Table 4.7.20.2-A.
- 
Field Details- 
ARRAYstatic instance for annotation is deeper in an array type
- 
INNER_TYPEstatic instance for annotation is deeper in a nested type
- 
WILDCARDstatic instance for annotation is on the bound of a wildcard type argument of a parameterized type
 
- 
- 
Method Details- 
typePathKindTypeAnnotation.TypePathComponent.Kind typePathKind()The type path kind items from JVMS Table 4.7.20.2-A.- Returns:
- the kind of path element
 
- 
typeArgumentIndexint typeArgumentIndex()JVMS: type_argument_index If the value of the type_path_kind item is 0, 1, or 2, then the value of the type_argument_index item is 0. If the value of the type_path_kind item is 3, then the value of the type_argument_index item specifies which type argument of a parameterized type is annotated, where 0 indicates the first type argument of a parameterized type.- Returns:
- the index within the type component
 
- 
ofstatic TypeAnnotation.TypePathComponent of(TypeAnnotation.TypePathComponent.Kind typePathKind, int typeArgumentIndex) Returns type path component of an annotation.- Parameters:
- typePathKind- the kind of path element
- typeArgumentIndex- the type argument index
- Returns:
- type path component of an annotation
 
 
-