/** * Looks up the <code>TypeIdItem</code> from the given <code>DexFile</code> for the given * type descriptor * @param dexFile the <code>Dexfile</code> to find the type in * @param typeDescriptor The string containing the type descriptor to look up * @return a <code>TypeIdItem</code> from the given <code>DexFile</code> for the given * type descriptor, or null if it doesn't exist */ public static TypeIdItem lookupTypeIdItem(DexFile dexFile, String typeDescriptor) { StringIdItem stringIdItem = StringIdItem.lookupStringIdItem(dexFile, typeDescriptor); if (stringIdItem == null) { return null; } TypeIdItem typeIdItem = new TypeIdItem(dexFile, stringIdItem); return dexFile.TypeIdsSection.getInternedItem(typeIdItem); }
String fieldType = field.type; StringIdItem fieldNameItem = StringIdItem.lookupStringIdItem(dexFile, fieldName); if (fieldNameItem == null) { return null;
private MethodIdItem parseAndResolveMethod(ClassPath.ClassDef classDef, String methodName, String methodParams, String methodRet) { StringIdItem methodNameItem = StringIdItem.lookupStringIdItem(dexFile, methodName); if (methodNameItem == null) { return null;
/** * Looks up the <code>TypeIdItem</code> from the given <code>DexFile</code> for the given * type descriptor * @param dexFile the <code>Dexfile</code> to find the type in * @param typeDescriptor The string containing the type descriptor to look up * @return a <code>TypeIdItem</code> from the given <code>DexFile</code> for the given * type descriptor, or null if it doesn't exist */ public static TypeIdItem lookupTypeIdItem(DexFile dexFile, String typeDescriptor) { StringIdItem stringIdItem = StringIdItem.lookupStringIdItem(dexFile, typeDescriptor); if (stringIdItem == null) { return null; } TypeIdItem typeIdItem = new TypeIdItem(dexFile, stringIdItem); return dexFile.TypeIdsSection.getInternedItem(typeIdItem); }
private MethodIdItem parseAndResolveMethod(ClassPath.ClassDef classDef, String methodName, String methodParams, String methodRet) { StringIdItem methodNameItem = StringIdItem.lookupStringIdItem(dexFile, methodName); if (methodNameItem == null) { return null;