/** * Returns a <code>StringDataItem</code> for the given values, and that has been interned into * the given <code>DexFile</code> * @param dexFile The <code>DexFile</code> that this item belongs to * @param value The string value that this item represents * @return a <code>StringDataItem</code> for the given values, and that has been interned into * the given <code>DexFile</code> */ public static StringDataItem internStringDataItem(DexFile dexFile, String value) { StringDataItem StringDataItem = new StringDataItem(dexFile, value); return dexFile.StringDataSection.intern(StringDataItem); }
/** * Returns an <code>EncodedArrayItem</code> for the given values, and that has been interned into the given * <code>DexFile</code> * @param dexFile The <code>DexFile</code> that this item belongs to * @param encodedArray The encoded array value * @return an <code>EncodedArrayItem</code> for the given values, and that has been interned into the given */ public static EncodedArrayItem internEncodedArrayItem(DexFile dexFile, ArrayEncodedSubValue encodedArray) { EncodedArrayItem encodedArrayItem = new EncodedArrayItem(dexFile, encodedArray); return dexFile.EncodedArraysSection.intern(encodedArrayItem); }
/** * Returns an <code>AnnotationItem</code> for the given values, and that has been interned into the given * <code>DexFile</code> * @param dexFile The <code>DexFile</code> that this item belongs to * @param visibility The visibility of this annotation * @param annotationValue The value of this annotation * @return an <code>AnnotationItem</code> for the given values, and that has been interned into the given * <code>DexFile</code> */ public static AnnotationItem internAnnotationItem(DexFile dexFile, AnnotationVisibility visibility, AnnotationEncodedSubValue annotationValue) { AnnotationItem annotationItem = new AnnotationItem(dexFile, visibility, annotationValue); return dexFile.AnnotationsSection.intern(annotationItem); }
/** * Returns an <code>AnnotationSetRefList</code> for the given annotation sets, and that has been interned into the * given <code>DexFile</code> * @param dexFile The <code>DexFile</code> that this item belongs to * @param annotationSets The annotation sets for this <code>AnnotationSetRefList</code> * @return an <code>AnnotationSetItem</code> for the given annotations */ public static AnnotationSetRefList internAnnotationSetRefList(DexFile dexFile, List<AnnotationSetItem> annotationSets) { AnnotationSetItem[] annotationSetsArray = new AnnotationSetItem[annotationSets.size()]; annotationSets.toArray(annotationSetsArray); AnnotationSetRefList annotationSetRefList = new AnnotationSetRefList(dexFile, annotationSetsArray); return dexFile.AnnotationSetRefListsSection.intern(annotationSetRefList); }
/** * Returns a <code>TypeListItem</code> for the given values, and that has been interned into * the given <code>DexFile</code> * @param dexFile The <code>DexFile</code> that this item belongs to * @param typeList A list of the types that this <code>TypeListItem</code> represents * @return a <code>TypeListItem</code> for the given values, and that has been interned into * the given <code>DexFile</code> */ public static TypeListItem internTypeListItem(DexFile dexFile, List<TypeIdItem> typeList) { TypeIdItem[] typeArray = new TypeIdItem[typeList.size()]; typeList.toArray(typeArray); TypeListItem typeListItem = new TypeListItem(dexFile, typeArray); return dexFile.TypeListsSection.intern(typeListItem); }
/** * Returns a new <code>DebugInfoItem</code> with the given values * @param dexFile The <code>DexFile</code> that this item belongs to * @param lineStart the initial value for the line number register for the debug info machine * @param parameterNames an array of the names of the associated method's parameters. The entire parameter * can be null if no parameter info is available, or any element can be null to indicate no info for that parameter * @param encodedDebugInfo the debug info, encoded as a byte array * @param referencedItems an array of the items referenced by instructions, in order of occurance in the encoded * debug info * @return a new <code>DebugInfoItem</code> with the given values */ public static DebugInfoItem internDebugInfoItem(DexFile dexFile, int lineStart, StringIdItem[] parameterNames, byte[] encodedDebugInfo, Item[] referencedItems) { DebugInfoItem debugInfoItem = new DebugInfoItem(dexFile, lineStart, parameterNames, encodedDebugInfo, referencedItems); return dexFile.DebugInfoItemsSection.intern(debugInfoItem); }
/** * 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 dexFile.CodeItemsSection.intern(codeItem);
return dexFile.ClassDataSection.intern(classDataItem);
fieldAnnotationFields, fieldAnnotationsArray, methodAnnotationMethods, methodAnnotationsArray, parameterAnnotationMethods, parameterAnnotationsArray); return dexFile.AnnotationDirectoriesSection.intern(annotationDirectoryItem);
/** * Returns a <code>StringDataItem</code> for the given values, and that has been interned into * the given <code>DexFile</code> * @param dexFile The <code>DexFile</code> that this item belongs to * @param value The string value that this item represents * @return a <code>StringDataItem</code> for the given values, and that has been interned into * the given <code>DexFile</code> */ public static StringDataItem internStringDataItem(DexFile dexFile, String value) { StringDataItem StringDataItem = new StringDataItem(dexFile, value); return dexFile.StringDataSection.intern(StringDataItem); }
/** * Returns an <code>EncodedArrayItem</code> for the given values, and that has been interned into the given * <code>DexFile</code> * @param dexFile The <code>DexFile</code> that this item belongs to * @param encodedArray The encoded array value * @return an <code>EncodedArrayItem</code> for the given values, and that has been interned into the given */ public static EncodedArrayItem internEncodedArrayItem(DexFile dexFile, ArrayEncodedSubValue encodedArray) { EncodedArrayItem encodedArrayItem = new EncodedArrayItem(dexFile, encodedArray); return dexFile.EncodedArraysSection.intern(encodedArrayItem); }
/** * Returns an <code>AnnotationSetRefList</code> for the given annotation sets, and that has been interned into the * given <code>DexFile</code> * @param dexFile The <code>DexFile</code> that this item belongs to * @param annotationSets The annotation sets for this <code>AnnotationSetRefList</code> * @return an <code>AnnotationSetItem</code> for the given annotations */ public static AnnotationSetRefList internAnnotationSetRefList(DexFile dexFile, List<AnnotationSetItem> annotationSets) { AnnotationSetItem[] annotationSetsArray = new AnnotationSetItem[annotationSets.size()]; annotationSets.toArray(annotationSetsArray); AnnotationSetRefList annotationSetRefList = new AnnotationSetRefList(dexFile, annotationSetsArray); return dexFile.AnnotationSetRefListsSection.intern(annotationSetRefList); }
/** * Returns an <code>AnnotationItem</code> for the given values, and that has been interned into the given * <code>DexFile</code> * @param dexFile The <code>DexFile</code> that this item belongs to * @param visibility The visibility of this annotation * @param annotationValue The value of this annotation * @return an <code>AnnotationItem</code> for the given values, and that has been interned into the given * <code>DexFile</code> */ public static AnnotationItem internAnnotationItem(DexFile dexFile, AnnotationVisibility visibility, AnnotationEncodedSubValue annotationValue) { AnnotationItem annotationItem = new AnnotationItem(dexFile, visibility, annotationValue); return dexFile.AnnotationsSection.intern(annotationItem); }
/** * Returns a <code>TypeListItem</code> for the given values, and that has been interned into * the given <code>DexFile</code> * @param dexFile The <code>DexFile</code> that this item belongs to * @param typeList A list of the types that this <code>TypeListItem</code> represents * @return a <code>TypeListItem</code> for the given values, and that has been interned into * the given <code>DexFile</code> */ public static TypeListItem internTypeListItem(DexFile dexFile, List<TypeIdItem> typeList) { TypeIdItem[] typeArray = new TypeIdItem[typeList.size()]; typeList.toArray(typeArray); TypeListItem typeListItem = new TypeListItem(dexFile, typeArray); return dexFile.TypeListsSection.intern(typeListItem); }
/** * Returns a new <code>DebugInfoItem</code> with the given values * @param dexFile The <code>DexFile</code> that this item belongs to * @param lineStart the initial value for the line number register for the debug info machine * @param parameterNames an array of the names of the associated method's parameters. The entire parameter * can be null if no parameter info is available, or any element can be null to indicate no info for that parameter * @param encodedDebugInfo the debug info, encoded as a byte array * @param referencedItems an array of the items referenced by instructions, in order of occurance in the encoded * debug info * @return a new <code>DebugInfoItem</code> with the given values */ public static DebugInfoItem internDebugInfoItem(DexFile dexFile, int lineStart, StringIdItem[] parameterNames, byte[] encodedDebugInfo, Item[] referencedItems) { DebugInfoItem debugInfoItem = new DebugInfoItem(dexFile, lineStart, parameterNames, encodedDebugInfo, referencedItems); return dexFile.DebugInfoItemsSection.intern(debugInfoItem); }
/** * Returns an <code>AnnotationDirectoryItem</code> for the given values, and that has been interned into the given * <code>DexFile</code> * @param dexFile The <code>DexFile</code> that this item belongs to * @param classAnnotations The annotations associated with the class * @param fieldAnnotations A list of <code>FieldAnnotation</code> objects containing the field annotations * @param methodAnnotations A list of <code>MethodAnnotation</code> objects containing the method annotations * @param parameterAnnotations A list of <code>ParameterAnnotation</code> objects containin the parameter * annotations * @return an <code>AnnotationItem</code> for the given values, and that has been interned into the given * <code>DexFile</code> */ public static AnnotationDirectoryItem internAnnotationDirectoryItem(DexFile dexFile, AnnotationSetItem classAnnotations, List<FieldAnnotation> fieldAnnotations, List<MethodAnnotation> methodAnnotations, List<ParameterAnnotation> parameterAnnotations) { AnnotationDirectoryItem annotationDirectoryItem = new AnnotationDirectoryItem(dexFile, classAnnotations, fieldAnnotations, methodAnnotations, parameterAnnotations); return dexFile.AnnotationDirectoriesSection.intern(annotationDirectoryItem); }
/** * 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 dexFile.CodeItemsSection.intern(codeItem);
return dexFile.ClassDataSection.intern(classDataItem);