public abstract class Annotations extends Attribute
constant_pool, length, name_index, tag
Constructor and Description |
---|
Annotations(byte annotationType,
int nameIndex,
int length,
AnnotationEntry[] annotationTable,
ConstantPool constantPool,
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[] annotationTable) |
protected void |
writeAnnotations(DataOutputStream dos) |
addAttributeReader, addAttributeReader, clone, copy, dump, getConstantPool, getLength, getName, getNameIndex, getTag, println, readAttribute, readAttribute, removeAttributeReader, setConstantPool, setLength, setNameIndex, toString
public 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 constantspublic void accept(Visitor v)
public final void setAnnotationTable(AnnotationEntry[] annotationTable)
annotationTable
- the entries to set in this annotationpublic AnnotationEntry[] getAnnotationEntries()
public final int getNumAnnotations()
public boolean isRuntimeVisible()
protected void writeAnnotations(DataOutputStream dos) throws IOException
IOException
Copyright © 2004–2023 The Apache Software Foundation. All rights reserved.