public abstract class Annotations extends Attribute
| Modifier and Type | Field and Description |
|---|---|
private AnnotationEntry[] |
annotation_table |
private boolean |
isRuntimeVisible |
constant_pool, length, name_index, tag| Constructor and Description |
|---|
Annotations(byte annotation_type,
int name_index,
int length,
AnnotationEntry[] annotation_table,
ConstantPool constant_pool,
boolean isRuntimeVisible) |
Annotations(byte annotation_type,
int name_index,
int length,
java.io.DataInput input,
ConstantPool constant_pool,
boolean isRuntimeVisible) |
| Modifier and Type | Method and Description |
|---|---|
void |
accept(Visitor v)
Called by objects that are traversing the nodes of the tree implicitely defined by the contents of a Java class.
|
AnnotationEntry[] |
getAnnotationEntries()
returns the array of annotation entries in this annotation
|
int |
getNumAnnotations() |
boolean |
isRuntimeVisible() |
void |
setAnnotationTable(AnnotationEntry[] annotation_table) |
protected void |
writeAnnotations(java.io.DataOutputStream dos) |
addAttributeReader, addAttributeReader, clone, copy, dump, getConstantPool, getLength, getName, getNameIndex, getTag, readAttribute, readAttribute, removeAttributeReader, setConstantPool, setLength, setNameIndex, toStringprivate AnnotationEntry[] annotation_table
private final boolean isRuntimeVisible
Annotations(byte annotation_type,
int name_index,
int length,
java.io.DataInput input,
ConstantPool constant_pool,
boolean isRuntimeVisible)
throws java.io.IOException
annotation_type - the subclass type of the annotationname_index - Index pointing to the name Codelength - Content length in bytesinput - Input streamconstant_pool - Array of constantsjava.io.IOExceptionpublic Annotations(byte annotation_type,
int name_index,
int length,
AnnotationEntry[] annotation_table,
ConstantPool constant_pool,
boolean isRuntimeVisible)
annotation_type - the subclass type of the annotationname_index - Index pointing to the name Codelength - Content length in bytesannotation_table - the actual annotationsconstant_pool - Array of constantspublic void accept(Visitor v)
public final void setAnnotationTable(AnnotationEntry[] annotation_table)
annotation_table - the entries to set in this annotationpublic AnnotationEntry[] getAnnotationEntries()
public final int getNumAnnotations()
public boolean isRuntimeVisible()
protected void writeAnnotations(java.io.DataOutputStream dos)
throws java.io.IOException
java.io.IOException