Class AnnotationsAttribute.Annotation
- java.lang.Object
-
- org.apache.commons.compress.harmony.unpack200.bytecode.AnnotationsAttribute.Annotation
-
- Enclosing class:
- AnnotationsAttribute
public static class AnnotationsAttribute.Annotation extends java.lang.Object
Represents the annotation structure for class file attributes.
-
-
Constructor Summary
Constructors Constructor Description Annotation(int numPairs, CPUTF8 type, CPUTF8[] elementNames, AnnotationsAttribute.ElementValue[] elementValues)Constructs a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<java.lang.Object>getClassFileEntries()Gets a list of class file entries.intgetLength()Gets the cumulative length of all element values.voidresolve(ClassConstantPool pool)Resolves this instance against a given pool.voidwriteBody(java.io.DataOutputStream dos)Writes this instance to the given output stream.
-
-
-
Constructor Detail
-
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 Detail
-
getClassFileEntries
public java.util.List<java.lang.Object> 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
public void resolve(ClassConstantPool pool)
Resolves this instance against a given pool.- Parameters:
pool- a class constant pool.
-
writeBody
public void writeBody(java.io.DataOutputStream dos) throws java.io.IOException
Writes this instance to the given output stream.- Parameters:
dos- the output stream.- Throws:
java.io.IOException- if an I/O error occurs.
-
-