/** * Looks up the <code>StringDataItem</code> from the given <code>DexFile</code> for the given * string value * @param dexFile the <code>Dexfile</code> to find the string value in * @param value The string value to look up * @return a <code>StringDataItem</code> from the given <code>DexFile</code> for the given * string value, or null if it doesn't exist **/ public static StringDataItem lookupStringDataItem(DexFile dexFile, String value) { StringDataItem StringDataItem = new StringDataItem(dexFile, value); return dexFile.StringDataSection.getInternedItem(StringDataItem); }
/** * Looks up the <code>TypeListItem</code> from the given <code>DexFile</code> for the given * list of types * @param dexFile the <code>Dexfile</code> to find the type in * @param typeList A list of the types that the <code>TypeListItem</code> represents * @return a <code>TypeListItem</code> from the given <code>DexFile</code> for the given * list of types, or null if it doesn't exist */ public static TypeListItem lookupTypeListItem(DexFile dexFile, List<TypeIdItem> typeList) { TypeIdItem[] typeArray = new TypeIdItem[typeList.size()]; typeList.toArray(typeArray); TypeListItem typeListItem = new TypeListItem(dexFile, typeArray); return dexFile.TypeListsSection.getInternedItem(typeListItem); }
/** * Looks up the <code>StringDataItem</code> from the given <code>DexFile</code> for the given * string value * @param dexFile the <code>Dexfile</code> to find the string value in * @param value The string value to look up * @return a <code>StringDataItem</code> from the given <code>DexFile</code> for the given * string value, or null if it doesn't exist **/ public static StringDataItem lookupStringDataItem(DexFile dexFile, String value) { StringDataItem StringDataItem = new StringDataItem(dexFile, value); return dexFile.StringDataSection.getInternedItem(StringDataItem); }
/** * Looks up the <code>TypeListItem</code> from the given <code>DexFile</code> for the given * list of types * @param dexFile the <code>Dexfile</code> to find the type in * @param typeList A list of the types that the <code>TypeListItem</code> represents * @return a <code>TypeListItem</code> from the given <code>DexFile</code> for the given * list of types, or null if it doesn't exist */ public static TypeListItem lookupTypeListItem(DexFile dexFile, List<TypeIdItem> typeList) { TypeIdItem[] typeArray = new TypeIdItem[typeList.size()]; typeList.toArray(typeArray); TypeListItem typeListItem = new TypeListItem(dexFile, typeArray); return dexFile.TypeListsSection.getInternedItem(typeListItem); }