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.
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.
Modifier and Type | Method and Description |
---|---|
public List | Returns: the non-runtime-visible type annotations on parts of this class, field, or methodReturns the non-runtime-visible type annotations on parts of this class, field, or method. |
public static RuntimeInvisibleTypeAnnotationsAttribute | Returns: aRuntimeInvisibleTypeAnnotations attributethe annotations annotations)Returns a |
public static RuntimeInvisibleTypeAnnotationsAttribute | Returns: aRuntimeInvisibleTypeAnnotations attributethe annotations annotations)Returns a |
annotations | back to summary |
---|---|
public List Returns the non-runtime-visible type annotations on parts of this class, field, or method.
|
of | back to summary |
---|---|
public static RuntimeInvisibleTypeAnnotationsAttribute of(List<TypeAnnotation> annotations) Returns a
|
of | back to summary |
---|---|
public static RuntimeInvisibleTypeAnnotationsAttribute of(TypeAnnotation... annotations) Returns a
|