Interface TypeAnnotation.FormalParameterTarget
- All Superinterfaces:
TypeAnnotation.TargetInfoPREVIEW
- Enclosing interface:
TypeAnnotationPREVIEW
public static sealed interface TypeAnnotation.FormalParameterTarget
extends TypeAnnotation.TargetInfoPREVIEW
FormalParameterTarget
is a preview API of the Java platform.
Preview features may be removed in a future release, or upgraded to permanent features of the Java platform.
Indicates that an annotation appears on the type in a formal parameter
declaration of a method, constructor, or lambda expression.
- Since:
- 22
-
Method Summary
Modifier and TypeMethodDescriptionint
Which formal parameter declaration has an annotated type.Methods declared in interface java.lang.classfile.TypeAnnotation.TargetInfoPREVIEW
size, targetType
-
Method Details
-
formalParameterIndex
int formalParameterIndex()Which formal parameter declaration has an annotated type.- Returns:
- the index into the formal parameter declarations, in the order declared in the source code
-
FormalParameterTarget
when preview features are enabled.