/** * Returns an <code>AnnotationSetItem</code> for the given annotations, and that has been interned into the given * <code>DexFile</code> * @param dexFile The <code>DexFile</code> that this item belongs to * @param annotations The annotations for this <code>AnnotationSetItem</code> * @return an <code>AnnotationSetItem</code> for the given annotations */ public static AnnotationSetItem internAnnotationSetItem(DexFile dexFile, List<AnnotationItem> annotations) { AnnotationSetItem annotationSetItem; if (annotations == null) { annotationSetItem = new AnnotationSetItem(dexFile, new AnnotationItem[0]); } else { AnnotationItem[] annotationsArray = new AnnotationItem[annotations.size()]; annotations.toArray(annotationsArray); annotationSetItem = new AnnotationSetItem(dexFile, annotationsArray); } return dexFile.AnnotationSetsSection.intern(annotationSetItem); }
return new AnnotationSetRefList(dexFile); case TYPE_ANNOTATION_SET_ITEM: return new AnnotationSetItem(dexFile); case TYPE_CLASS_DATA_ITEM: return new ClassDataItem(dexFile);
/** * Returns an <code>AnnotationSetItem</code> for the given annotations, and that has been interned into the given * <code>DexFile</code> * @param dexFile The <code>DexFile</code> that this item belongs to * @param annotations The annotations for this <code>AnnotationSetItem</code> * @return an <code>AnnotationSetItem</code> for the given annotations */ public static AnnotationSetItem internAnnotationSetItem(DexFile dexFile, List<AnnotationItem> annotations) { AnnotationSetItem annotationSetItem; if (annotations == null) { annotationSetItem = new AnnotationSetItem(dexFile, new AnnotationItem[0]); } else { AnnotationItem[] annotationsArray = new AnnotationItem[annotations.size()]; annotations.toArray(annotationsArray); annotationSetItem = new AnnotationSetItem(dexFile, annotationsArray); } return dexFile.AnnotationSetsSection.intern(annotationSetItem); }
return new AnnotationSetRefList(dexFile); case TYPE_ANNOTATION_SET_ITEM: return new AnnotationSetItem(dexFile); case TYPE_CLASS_DATA_ITEM: return new ClassDataItem(dexFile);