Methods Summary |
---|
public void | addContents(DexFile file){@inheritDoc}
MixedItemSection byteData = file.getByteData();
int size = items.length;
for (int i = 0; i < size; i++) {
items[i] = byteData.intern(items[i]);
}
|
protected int | compareTo0(OffsettedItem other){@inheritDoc}
AnnotationSetItem otherSet = (AnnotationSetItem) other;
return annotations.compareTo(otherSet.annotations);
|
public com.android.dexgen.rop.annotation.Annotations | getAnnotations()Gets the underlying annotations of this instance
return annotations;
|
public int | hashCode(){@inheritDoc}
return annotations.hashCode();
|
public ItemType | itemType(){@inheritDoc}
return ItemType.TYPE_ANNOTATION_SET_ITEM;
|
protected void | place0(Section addedTo, int offset){@inheritDoc}
// Sort the array to be in type id index order.
AnnotationItem.sortByTypeIdIndex(items);
|
public java.lang.String | toHuman(){@inheritDoc}
return annotations.toString();
|
private static int | writeSize(com.android.dexgen.rop.annotation.Annotations annotations)Gets the write size for the given set.
// This includes an int size at the start of the list.
try {
return (annotations.size() * ENTRY_WRITE_SIZE) + 4;
} catch (NullPointerException ex) {
// Elucidate the exception.
throw new NullPointerException("list == null");
}
|
protected void | writeTo0(DexFile file, com.android.dexgen.util.AnnotatedOutput out){@inheritDoc}
boolean annotates = out.annotates();
int size = items.length;
if (annotates) {
out.annotate(0, offsetString() + " annotation set");
out.annotate(4, " size: " + Hex.u4(size));
}
out.writeInt(size);
for (int i = 0; i < size; i++) {
AnnotationItem item = items[i];
int offset = item.getAbsoluteOffset();
if (annotates) {
out.annotate(4, " entries[" + Integer.toHexString(i) + "]: " +
Hex.u4(offset));
items[i].annotateTo(out, " ");
}
out.writeInt(offset);
}
|