Class AnnotationsAttribute.Annotation
java.lang.Object
org.apache.commons.compress.harmony.unpack200.bytecode.AnnotationsAttribute.Annotation
- Enclosing class:
- AnnotationsAttribute
Represents the annotation structure for class file attributes.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final CPUTF8[]private final AnnotationsAttribute.ElementValue[]private int[]private final intprivate final CPUTF8private int -
Constructor Summary
ConstructorsConstructorDescriptionAnnotation(int numPairs, CPUTF8 type, CPUTF8[] elementNames, AnnotationsAttribute.ElementValue[] elementValues) Constructs a new instance. -
Method Summary
Modifier and TypeMethodDescriptionGets a list of class file entries.intGets the cumulative length of all element values.voidresolve(ClassConstantPool pool) Resolves this instance against a given pool.voidWrites this instance to the given output stream.
-
Field Details
-
numPairs
private final int numPairs -
elementNames
-
elementValues
-
type
-
typeIndex
private int typeIndex -
nameIndexes
private int[] nameIndexes
-
-
Constructor Details
-
Annotation
public Annotation(int numPairs, CPUTF8 type, CPUTF8[] elementNames, AnnotationsAttribute.ElementValue[] elementValues) Constructs a new instance.- Parameters:
numPairs- Number of pairs, matches the lengths ofelementNamesandelementValues.type- Type.elementNames- Element names.elementValues- Element values.
-
-
Method Details
-
getClassFileEntries
Gets a list of class file entries.- Returns:
- a list of class file entries.
-
getLength
public int getLength()Gets the cumulative length of all element values.- Returns:
- the cumulative length of all element values.
-
resolve
Resolves this instance against a given pool.- Parameters:
pool- a class constant pool.
-
writeBody
Writes this instance to the given output stream.- Parameters:
dos- the output stream.- Throws:
IOException- if an I/O error occurs.
-