- All Superinterfaces:
ClassFileElement,WritableElement<Annotation>
- All Known Subinterfaces:
TypeAnnotation
- All Known Implementing Classes:
AnnotationImpl,UnboundAttribute.UnboundTypeAnnotation
public sealed interface Annotation
extends WritableElement<Annotation>
permits TypeAnnotation, AnnotationImpl
Models an annotation on a declaration.
- Since:
- 22
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionReturns the class of the annotation.default ClassDescReturns the class of the annotation, as a symbolic descriptor.elements()Returns the elements of the annotation.static Annotationof(ClassDesc annotationClass, List<AnnotationElement> elements) Returns an annotation.static Annotationof(ClassDesc annotationClass, AnnotationElement... elements) Returns an annotation.static Annotationof(Utf8Entry annotationClass, List<AnnotationElement> elements) Returns an annotation.static Annotationof(Utf8Entry annotationClass, AnnotationElement... elements) Returns an annotation.Methods inherited from interface org.glavo.classfile.WritableElement
writeTo
-
Method Details
-
className
Utf8Entry className()Returns the class of the annotation.- Returns:
- the class of the annotation
-
classSymbol
Returns the class of the annotation, as a symbolic descriptor.- Returns:
- the class of the annotation, as a symbolic descriptor
-
elements
List<AnnotationElement> elements()Returns the elements of the annotation.- Returns:
- the elements of the annotation
-
of
Returns an annotation.- Parameters:
annotationClass- the class of the annotationelements- the elements of the annotation- Returns:
- an annotation
-
of
Returns an annotation.- Parameters:
annotationClass- the class of the annotationelements- the elements of the annotation- Returns:
- an annotation
-
of
Returns an annotation.- Parameters:
annotationClass- the class of the annotationelements- the elements of the annotation- Returns:
- an annotation
-
of
Returns an annotation.- Parameters:
annotationClass- the class of the annotationelements- the elements of the annotation- Returns:
- an annotation
-