Interface TypeAnnotation.TypePathComponent

All Known Implementing Classes:
UnboundAttribute.TypePathComponentImpl
Enclosing interface:
TypeAnnotation

public static sealed interface TypeAnnotation.TypePathComponent permits UnboundAttribute.TypePathComponentImpl
JVMS: Wherever a type is used in a declaration or expression, the type_path structure identifies which part of the type is annotated. An annotation may appear on the type itself, but if the type is a reference type, then there are additional locations where an annotation may appear: If an array type T[] is used in a declaration or expression, then an annotation may appear on any component type of the array type, including the element type. If a nested type T1.T2 is used in a declaration or expression, then an annotation may appear on the name of the innermost member type and any enclosing type for which a type annotation is admissible . If a parameterized type T<A> or T<? extends A> or T<? super A> is used in a declaration or expression, then an annotation may appear on any type argument or on the bound of any wildcard type argument. JVMS: ... each entry in the path array represents an iterative, left-to-right step towards the precise location of the annotation in an array type, nested type, or parameterized type. (In an array type, the iteration visits the array type itself, then its component type, then the component type of that component type, and so on, until the element type is reached.)