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.
-
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.int
Gets the cumulative length of all element values.void
resolve
(ClassConstantPool pool) Resolves this instance against a given pool.void
Writes this instance to the given output stream.
-
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 ofelementNames
andelementValues
.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
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.
-