Top Description Methods
java.lang.classfile.attribute

public sealed Interface RuntimeInvisibleTypeAnnotationsAttribute

extends Attribute<RuntimeInvisibleTypeAnnotationsAttribute>, ClassElement, MethodElement, FieldElement, CodeElement
Known Direct Implementers
jdk.internal.classfile.impl.BoundAttribute.BoundRuntimeInvisibleTypeAnnotationsAttribute, jdk.internal.classfile.impl.UnboundAttribute.UnboundRuntimeInvisibleTypeAnnotationsAttribute
Annotations
@PreviewFeature
feature:CLASSFILE_API
Imports
java.util.List, java.lang.classfile.Attribute, .ClassElement, .CodeElement, .FieldElement, .MethodElement, .TypeAnnotation, jdk.internal.classfile.impl.BoundAttribute, .UnboundAttribute, jdk.internal.javac.PreviewFeature

Preview

Second Preview of ClassFile API (JEP 466).

Programs can only use RuntimeInvisibleTypeAnnotationsAttribute when preview features are enabled.
Preview features may be removed in a future release, or upgraded to permanent features of the Java platform.

Models the RuntimeInvisibleTypeAnnotations attribute 4.7.21, which can appear on classes, methods, fields, and code attributes. Delivered as a java.lang.classfile.ClassElement, java.lang.classfile.FieldElement, java.lang.classfile.MethodElement, or CodeElement when traversing the corresponding model type.

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 8.

Since
22

Method Summary

Modifier and TypeMethod and Description
public List<TypeAnnotation>

Returns:

the non-runtime-visible type annotations on parts of this class, field, or method
annotations
()

Returns the non-runtime-visible type annotations on parts of this class, field, or method.

public static RuntimeInvisibleTypeAnnotationsAttribute

Returns:

a RuntimeInvisibleTypeAnnotations attribute
of
(List<TypeAnnotation>
the annotations
annotations
)

Returns a RuntimeInvisibleTypeAnnotations attribute.

public static RuntimeInvisibleTypeAnnotationsAttribute

Returns:

a RuntimeInvisibleTypeAnnotations attribute
of
(TypeAnnotation...
the annotations
annotations
)

Returns a RuntimeInvisibleTypeAnnotations attribute.

Inherited from java.lang.classfile.Attribute:
attributeMapperattributeName

Method Detail

annotationsback to summary
public List<TypeAnnotation> annotations()

Returns the non-runtime-visible type annotations on parts of this class, field, or method.

Returns:List<TypeAnnotation>

the non-runtime-visible type annotations on parts of this class, field, or method

ofback to summary
public static RuntimeInvisibleTypeAnnotationsAttribute of(List<TypeAnnotation> annotations)

Returns a RuntimeInvisibleTypeAnnotations attribute.

Parameters
annotations:List<TypeAnnotation>

the annotations

Returns:RuntimeInvisibleTypeAnnotationsAttribute

a RuntimeInvisibleTypeAnnotations attribute

ofback to summary
public static RuntimeInvisibleTypeAnnotationsAttribute of(TypeAnnotation... annotations)

Returns a RuntimeInvisibleTypeAnnotations attribute.

Parameters
annotations:TypeAnnotation[]

the annotations

Returns:RuntimeInvisibleTypeAnnotationsAttribute

a RuntimeInvisibleTypeAnnotations attribute