# Uses of Interface
java.lang.classfile.Annotation

Packages that use AnnotationPREVIEW
Package
Description
java.lang.classfile
Provides classfile parsing, generation, and transformation library.
java.lang.classfile.attribute
Provides interfaces describing classfile attributes for the `java.lang.classfile`PREVIEW library.

- ## Uses of AnnotationPREVIEW in java.lang.classfilePREVIEW

  Subinterfaces of AnnotationPREVIEW in java.lang.classfilePREVIEW
  Modifier and Type
  Interface
  Description
  `interface`
  `TypeAnnotationPREVIEW`
  Preview.
  Models an annotation on a type use, as defined in 4.7.19 and 4.7.20.
  Methods in java.lang.classfilePREVIEW that return AnnotationPREVIEW
  Modifier and Type
  Method
  Description
  `AnnotationPREVIEW`
  AnnotationValue.OfAnnotation.`annotation()`
  Returns the annotation.
  `static AnnotationPREVIEW`
  Annotation.`of(Utf8EntryPREVIEW annotationClass, AnnotationElementPREVIEW... elements)`
  Returns an annotation.
  `static AnnotationPREVIEW`
  Annotation.`of(Utf8EntryPREVIEW annotationClass, List<AnnotationElementPREVIEW> elements)`
  Returns an annotation.
  `static AnnotationPREVIEW`
  Annotation.`of(ClassDesc annotationClass, AnnotationElementPREVIEW... elements)`
  Returns an annotation.
  `static AnnotationPREVIEW`
  Annotation.`of(ClassDesc annotationClass, List<AnnotationElementPREVIEW> elements)`
  Returns an annotation.
  Methods in java.lang.classfilePREVIEW with parameters of type AnnotationPREVIEW
  Modifier and Type
  Method
  Description
  `static AnnotationElementPREVIEW`
  AnnotationElement.`ofAnnotation(String name, AnnotationPREVIEW value)`
  Returns an annotation key-value pair for an annotation-valued annotation.
  `static AnnotationValue.OfAnnotationPREVIEW`
  AnnotationValue.`ofAnnotation(AnnotationPREVIEW value)`
  Returns an annotation element for an annotation-valued element.

- ## Uses of AnnotationPREVIEW in java.lang.classfile.attributePREVIEW

  Methods in java.lang.classfile.attributePREVIEW that return types with arguments of type AnnotationPREVIEW
  Modifier and Type
  Method
  Description
  `List<AnnotationPREVIEW>`
  RuntimeInvisibleAnnotationsAttribute.`annotations()`
  Returns the non-runtime-visible annotations on this class, field, or method.
  `List<AnnotationPREVIEW>`
  RuntimeVisibleAnnotationsAttribute.`annotations()`
  Returns the runtime-visible annotations on this class, field, or method.
  `List<List<AnnotationPREVIEW>>`
  RuntimeInvisibleParameterAnnotationsAttribute.`parameterAnnotations()`
  Returns the list of annotations corresponding to each method parameter.
  `List<List<AnnotationPREVIEW>>`
  RuntimeVisibleParameterAnnotationsAttribute.`parameterAnnotations()`
  Returns the list of annotations corresponding to each method parameter.
  Methods in java.lang.classfile.attributePREVIEW with parameters of type AnnotationPREVIEW
  Modifier and Type
  Method
  Description
  `static RuntimeInvisibleAnnotationsAttributePREVIEW`
  RuntimeInvisibleAnnotationsAttribute.`of(AnnotationPREVIEW... annotations)`
  Returns a `RuntimeInvisibleAnnotations` attribute.
  `static RuntimeVisibleAnnotationsAttributePREVIEW`
  RuntimeVisibleAnnotationsAttribute.`of(AnnotationPREVIEW... annotations)`
  Returns a `RuntimeVisibleAnnotations` attribute.
  Method parameters in java.lang.classfile.attributePREVIEW with type arguments of type AnnotationPREVIEW
  Modifier and Type
  Method
  Description
  `static RuntimeInvisibleAnnotationsAttributePREVIEW`
  RuntimeInvisibleAnnotationsAttribute.`of(List<AnnotationPREVIEW> annotations)`
  Returns a `RuntimeInvisibleAnnotations` attribute.
  `static RuntimeInvisibleParameterAnnotationsAttributePREVIEW`
  RuntimeInvisibleParameterAnnotationsAttribute.`of(List<List<AnnotationPREVIEW>> parameterAnnotations)`
  Returns a `RuntimeInvisibleParameterAnnotations` attribute.
  `static RuntimeVisibleAnnotationsAttributePREVIEW`
  RuntimeVisibleAnnotationsAttribute.`of(List<AnnotationPREVIEW> annotations)`
  Returns a `RuntimeVisibleAnnotations` attribute.
  `static RuntimeVisibleParameterAnnotationsAttributePREVIEW`
  RuntimeVisibleParameterAnnotationsAttribute.`of(List<List<AnnotationPREVIEW>> parameterAnnotations)`
  Returns a `RuntimeVisibleParameterAnnotations` attribute.