AnnotationSetRefItempublic final class AnnotationSetRefItem extends OffsettedItem Indirect reference to an {@link AnnotationSetItem}. |
Fields Summary |
---|
private static final int | ALIGNMENTthe required alignment for instances of this class | private static final int | WRITE_SIZEwrite size of this class, in bytes | private AnnotationSetItem | annotations{@code non-null;} the annotation set to refer to |
Constructors Summary |
---|
public AnnotationSetRefItem(AnnotationSetItem annotations)Constructs an instance.
super(ALIGNMENT, WRITE_SIZE);
if (annotations == null) {
throw new NullPointerException("annotations == null");
}
this.annotations = annotations;
|
Methods Summary |
---|
public void | addContents(DexFile file){@inheritDoc}
MixedItemSection wordData = file.getWordData();
annotations = wordData.intern(annotations);
| public ItemType | itemType(){@inheritDoc}
return ItemType.TYPE_ANNOTATION_SET_REF_ITEM;
| public java.lang.String | toHuman(){@inheritDoc}
return annotations.toHuman();
| protected void | writeTo0(DexFile file, com.android.dexgen.util.AnnotatedOutput out){@inheritDoc}
int annotationsOff = annotations.getAbsoluteOffset();
if (out.annotates()) {
out.annotate(4, " annotations_off: " + Hex.u4(annotationsOff));
}
out.writeInt(annotationsOff);
|
|