public abstract class Annotations extends Attribute implements Iterable<AnnotationEntry>
constant_pool, EMPTY_ARRAY, length, name_index, tag| Constructor and Description |
|---|
Annotations(byte annotationType,
int nameIndex,
int length,
AnnotationEntry[] annotationTable,
ConstantPool constantPool,
boolean isRuntimeVisible)
Constructs an instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
accept(Visitor v)
Called by objects that are traversing the nodes of the tree implicitly
defined by the contents of a Java class.
|
Attribute |
copy(ConstantPool constantPool) |
AnnotationEntry[] |
getAnnotationEntries()
Gets the array of annotation entries in this annotation
|
int |
getNumAnnotations()
Gets the number of annotation entries in this annotation.
|
boolean |
isRuntimeVisible() |
Iterator<AnnotationEntry> |
iterator() |
void |
setAnnotationTable(AnnotationEntry[] annotationTable)
Sets the entries to set in this annotation.
|
String |
toString()
Converts to a String representation.
|
protected void |
writeAnnotations(DataOutputStream dos) |
addAttributeReader, addAttributeReader, clone, dump, getConstantPool, getLength, getName, getNameIndex, getTag, println, readAttribute, readAttribute, removeAttributeReader, setConstantPool, setLength, setNameIndexequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitforEach, spliteratorpublic Annotations(byte annotationType, int nameIndex, int length, AnnotationEntry[] annotationTable, ConstantPool constantPool, boolean isRuntimeVisible)
annotationType - the subclass type of the annotationnameIndex - Index pointing to the name Codelength - Content length in bytesannotationTable - the actual annotationsconstantPool - Array of constantsisRuntimeVisible - whether this Annotation visible at runtimepublic void accept(Visitor v)
public Attribute copy(ConstantPool constantPool)
public AnnotationEntry[] getAnnotationEntries()
public final int getNumAnnotations()
public boolean isRuntimeVisible()
public Iterator<AnnotationEntry> iterator()
iterator in interface Iterable<AnnotationEntry>public final void setAnnotationTable(AnnotationEntry[] annotationTable)
annotationTable - the entries to set in this annotationprotected void writeAnnotations(DataOutputStream dos) throws IOException
IOExceptionCopyright © 2004–2022 The Apache Software Foundation. All rights reserved.