# Uses of Interface
java.lang.classfile.TypeAnnotation

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

## Uses of TypeAnnotation in java.lang.classfile

Methods in java.lang.classfile that return TypeAnnotation
Modifier and Type
Method
Description
`static TypeAnnotation`
TypeAnnotation.`of(TypeAnnotation.TargetInfo targetInfo, List<TypeAnnotation.TypePathComponent> targetPath, Annotation annotation)`
Returns a `type_annotation` structure.

## Uses of TypeAnnotation in java.lang.classfile.attribute

Methods in java.lang.classfile.attribute that return types with arguments of type TypeAnnotation
Modifier and Type
Method
Description
`List<TypeAnnotation>`
RuntimeInvisibleTypeAnnotationsAttribute.`annotations()`
Returns the run-time invisible annotations on uses of types in this structure.
`List<TypeAnnotation>`
RuntimeVisibleTypeAnnotationsAttribute.`annotations()`
Returns the run-time visible annotations on uses of types in this structure.
Methods in java.lang.classfile.attribute with parameters of type TypeAnnotation
Modifier and Type
Method
Description
`static RuntimeInvisibleTypeAnnotationsAttribute`
RuntimeInvisibleTypeAnnotationsAttribute.`of(TypeAnnotation... annotations)`
Returns a `RuntimeInvisibleTypeAnnotations` attribute.
`static RuntimeVisibleTypeAnnotationsAttribute`
RuntimeVisibleTypeAnnotationsAttribute.`of(TypeAnnotation... annotations)`
Returns a `RuntimeVisibleTypeAnnotations` attribute.
Method parameters in java.lang.classfile.attribute with type arguments of type TypeAnnotation
Modifier and Type
Method
Description
`static RuntimeInvisibleTypeAnnotationsAttribute`
RuntimeInvisibleTypeAnnotationsAttribute.`of(List<TypeAnnotation> annotations)`
Returns a `RuntimeInvisibleTypeAnnotations` attribute.
`static RuntimeVisibleTypeAnnotationsAttribute`
RuntimeVisibleTypeAnnotationsAttribute.`of(List<TypeAnnotation> annotations)`
Returns a `RuntimeVisibleTypeAnnotations` attribute.