Interface AnnotationDefaultAttribute
- All Superinterfaces:
AttributePREVIEW<AnnotationDefaultAttributePREVIEW>,ClassFileElementPREVIEW,MethodElementPREVIEW
public sealed interface AnnotationDefaultAttribute
extends AttributePREVIEW<AnnotationDefaultAttributePREVIEW>, MethodElementPREVIEW
AnnotationDefaultAttribute 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.
Models the
AnnotationDefault attribute (JVMS 4.7.22), which can
appear on methods of annotation types, and records the default value
9.6.2 for the element corresponding to this method. Delivered as a
MethodElementPREVIEW when traversing the elements of a MethodModelPREVIEW.
The attribute does not permit multiple instances in a given location. Subsequent occurrence of the attribute takes precedence during the attributed element build or transformation.
The attribute was introduced in the Java SE Platform version 5.0.
- Since:
- 22
-
Method Summary
Modifier and TypeMethodDescriptionReturns the default value of the annotation type element represented by this method.of(AnnotationValuePREVIEW annotationDefault) Returns anAnnotationDefaultattribute.Methods declared in interface java.lang.classfile.AttributePREVIEW
attributeMapper, attributeName
-
Method Details
-
defaultValue
AnnotationValuePREVIEW defaultValue()Returns the default value of the annotation type element represented by this method.- Returns:
- the default value of the annotation type element represented by this method
-
of
Returns anAnnotationDefaultattribute.- Parameters:
annotationDefault- the default value of the annotation type element- Returns:
- an
AnnotationDefaultattribute
-
AnnotationDefaultAttributewhen preview features are enabled.