| Modifier and Type | Field and Description |
|---|---|
| private static final int | ALIGNMENT
the required alignment for instances of this class |
| private AnnotationSetItem | classAnnotations
|
| private static final int | ELEMENT_SIZE
write size of a list element, in bytes |
| private ArrayList | fieldAnnotations
|
| private static final int | HEADER_SIZE
write size of this class's header, in bytes |
| private ArrayList | methodAnnotations
|
| private ArrayList | parameterAnnotations
|
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | addContents(DexFile
non-null; the file to populateImplements abstract org. DexFile with items from within this instance.
|
| public void | addFieldAnnotations(CstFieldRef
non-null; field in questionnon-null; associated annotations to addAdds a field annotations item to this instance. |
| public void | addMethodAnnotations(CstMethodRef
non-null; method in questionnon-null; associated annotations to addAdds a method annotations item to this instance. |
| public void | addParameterAnnotations(CstMethodRef
non-null; method in questionnon-null; associated list of annotation sets to addAdds a parameter annotations item to this instance. |
| public int | compareTo0(OffsettedItem
non-null; instance to compare toOverrides org. |
| pack-priv void | debugPrint(PrintWriter
non-null; where to output toPrints out the contents of this instance, in a debugging-friendly way. |
| public Annotations | Returns: null-ok; the method annotations, if anynon-null; the methodGets the method annotations for a given method, if any. |
| public AnnotationsList | Returns: null-ok; the parameter annotations, if anynon-null; the methodGets the parameter annotations for a given method, if any. |
| public int | |
| public boolean | Returns: true if this item is empty, or false
if notReturns whether this item is empty (has no contents). |
| public boolean | Returns: true if this is an interning candidate, or
false if notReturns whether this item is a candidate for interning. |
| public ItemType | itemType()
Implements abstract org. |
| private static int | |
| protected void | place0(Section
non-null; the section this instance has been added to>= 0; the offset from the start of the
section where this instance was placedOverrides org. |
| public void | setClassAnnotations(Annotations
non-null; annotations to set for this classSets the direct annotations on this instance. |
| public String | toHuman()
Implements abstract org. |
| protected void | writeTo0(DexFile
non-null; the file to use for referencenon-null; where to write toImplements abstract org. |
| ALIGNMENT | back to summary |
|---|---|
| private static final int ALIGNMENT the required alignment for instances of this class | |
| classAnnotations | back to summary |
|---|---|
| private AnnotationSetItem classAnnotations
| |
| ELEMENT_SIZE | back to summary |
|---|---|
| private static final int ELEMENT_SIZE write size of a list element, in bytes | |
| fieldAnnotations | back to summary |
|---|---|
| private ArrayList<FieldAnnotationStruct> fieldAnnotations
| |
| HEADER_SIZE | back to summary |
|---|---|
| private static final int HEADER_SIZE write size of this class's header, in bytes | |
| methodAnnotations | back to summary |
|---|---|
| private ArrayList<MethodAnnotationStruct> methodAnnotations
| |
| parameterAnnotations | back to summary |
|---|---|
| private ArrayList<ParameterAnnotationStruct> parameterAnnotations
| |
| AnnotationsDirectoryItem | back to summary |
|---|---|
| public AnnotationsDirectoryItem() Constructs an empty instance. | |
| addContents | back to summary |
|---|---|
| public void addContents(DexFile file) Implements abstract org. Doc from org. Populates a Note Subclasses must override this to do something appropriate.
| |
| addFieldAnnotations | back to summary |
|---|---|
| public void addFieldAnnotations(CstFieldRef field, Annotations annotations) Adds a field annotations item to this instance.
| |
| addMethodAnnotations | back to summary |
|---|---|
| public void addMethodAnnotations(CstMethodRef method, Annotations annotations) Adds a method annotations item to this instance.
| |
| addParameterAnnotations | back to summary |
|---|---|
| public void addParameterAnnotations(CstMethodRef method, AnnotationsList list) Adds a parameter annotations item to this instance.
| |
| compareTo0 | back to summary |
|---|---|
| public int compareTo0(OffsettedItem other) Overrides org. Doc from org. Compares this instance to another which is guaranteed to be of the same class. The default implementation of this method is to throw an exception (unsupported operation). If a particular class needs to actually sort, then it should override this method. Note This throws an exception if this item is not internable.
| |
| debugPrint | back to summary |
|---|---|
| pack-priv void debugPrint(PrintWriter out) Prints out the contents of this instance, in a debugging-friendly
way. This is meant to be called from
| |
| getMethodAnnotations | back to summary |
|---|---|
| public Annotations getMethodAnnotations(CstMethodRef method) Gets the method annotations for a given method, if any. This is meant for use by debugging / dumping code.
| |
| getParameterAnnotations | back to summary |
|---|---|
| public AnnotationsList getParameterAnnotations(CstMethodRef method) Gets the parameter annotations for a given method, if any. This is meant for use by debugging / dumping code.
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| isEmpty | back to summary |
|---|---|
| public boolean isEmpty() Returns whether this item is empty (has no contents).
| |
| isInternable | back to summary |
|---|---|
| public boolean isInternable() Returns whether this item is a candidate for interning. The only interning candidates are ones that only have a non-null set of class annotations, with no other lists.
| |
| itemType | back to summary |
|---|---|
| public ItemType itemType() Implements abstract org. Doc from org. Returns the item type for this instance. | |
| listSize | back to summary |
|---|---|
| private static int listSize(ArrayList<?> list) Gets the list size of the given list, or
| |
| place0 | back to summary |
|---|---|
| protected void place0(Section addedTo, int offset) Overrides org. Doc from org. Does additional work required when placing an instance. The default implementation of this method is a no-op. If a particular class needs to do something special, then it should override this method. In particular, if this instance did not know its write size up-front, then this method is responsible for setting it. | |
| setClassAnnotations | back to summary |
|---|---|
| public void setClassAnnotations(Annotations annotations) Sets the direct annotations on this instance. These are annotations made on the class, per se, as opposed to on one of its members. It is only valid to call this method at most once per instance.
| |
| toHuman | back to summary |
|---|---|
| public String toHuman() Implements abstract org. Doc from org. Gets a short human-readable string representing this instance. | |
| writeTo0 | back to summary |
|---|---|
| protected void writeTo0(DexFile file, AnnotatedOutput out) Implements abstract org. Doc from org. Performs the actual write of the contents of this instance to
the given data section. This is called by
| |