/** * Looks up the <code>ProtoIdItem</code> from the given <code>DexFile</code> for the given * values * @param dexFile the <code>Dexfile</code> to find the type in * @param returnType the return type * @param parameters a <code>TypeListItem</code> containing a list of the parameter types * @return a <code>ProtoIdItem</code> from the given <code>DexFile</code> for the given * values, or null if it doesn't exist */ public static ProtoIdItem lookupProtoIdItem(DexFile dexFile, TypeIdItem returnType, TypeListItem parameters) { ProtoIdItem protoIdItem = new ProtoIdItem(dexFile, returnType, parameters); return dexFile.ProtoIdsSection.getInternedItem(protoIdItem); }
/** * Looks up a <code>MethodIdItem</code> from the given <code>DexFile</code> for the given * values * @param dexFile The <code>DexFile</code> that this item belongs to * @param classType the class that the method is a member of * @param methodPrototype the type of the method * @param methodName the name of the method * @return a <code>MethodIdItem</code> from the given <code>DexFile</code> for the given * values, or null if it doesn't exist */ public static MethodIdItem lookupMethodIdItem(DexFile dexFile, TypeIdItem classType, ProtoIdItem methodPrototype, StringIdItem methodName) { MethodIdItem methodIdItem = new MethodIdItem(dexFile, classType, methodPrototype, methodName); return dexFile.MethodIdsSection.getInternedItem(methodIdItem); }
/** * Looks up a <code>FieldIdItem</code> from the given <code>DexFile</code> for the given * values * @param dexFile The <code>DexFile</code> that this item belongs to * @param classType the class that the field is a member of * @param fieldType the type of the field * @param fieldName the name of the field * @return a <code>FieldIdItem</code> from the given <code>DexFile</code> for the given * values, or null if it doesn't exist */ public static FieldIdItem lookupFieldIdItem(DexFile dexFile, TypeIdItem classType, TypeIdItem fieldType, StringIdItem fieldName) { FieldIdItem fieldIdItem = new FieldIdItem(dexFile, classType, fieldType, fieldName); return dexFile.FieldIdsSection.getInternedItem(fieldIdItem); }
/** * 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); }
/** * Looks up the <code>StringIdItem</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 stringValue The string value to look up * @return a <code>StringIdItem</code> from the given <code>DexFile</code> for the given * string value, or null if it doesn't exist */ public static StringIdItem lookupStringIdItem(DexFile dexFile, String stringValue) { StringDataItem stringDataItem = StringDataItem.lookupStringDataItem(dexFile, stringValue); if (stringDataItem == null) { return null; } StringIdItem stringIdItem = new StringIdItem(dexFile, stringDataItem); return dexFile.StringIdsSection.getInternedItem(stringIdItem); }
return dexFile.ClassDefsSection.getInternedItem(classDefItem);
/** * Looks up the <code>ProtoIdItem</code> from the given <code>DexFile</code> for the given * values * @param dexFile the <code>Dexfile</code> to find the type in * @param returnType the return type * @param parameters a <code>TypeListItem</code> containing a list of the parameter types * @return a <code>ProtoIdItem</code> from the given <code>DexFile</code> for the given * values, or null if it doesn't exist */ public static ProtoIdItem lookupProtoIdItem(DexFile dexFile, TypeIdItem returnType, TypeListItem parameters) { ProtoIdItem protoIdItem = new ProtoIdItem(dexFile, returnType, parameters); return dexFile.ProtoIdsSection.getInternedItem(protoIdItem); }
/** * Looks up a <code>FieldIdItem</code> from the given <code>DexFile</code> for the given * values * @param dexFile The <code>DexFile</code> that this item belongs to * @param classType the class that the field is a member of * @param fieldType the type of the field * @param fieldName the name of the field * @return a <code>FieldIdItem</code> from the given <code>DexFile</code> for the given * values, or null if it doesn't exist */ public static FieldIdItem lookupFieldIdItem(DexFile dexFile, TypeIdItem classType, TypeIdItem fieldType, StringIdItem fieldName) { FieldIdItem fieldIdItem = new FieldIdItem(dexFile, classType, fieldType, fieldName); return dexFile.FieldIdsSection.getInternedItem(fieldIdItem); }
/** * Looks up a <code>MethodIdItem</code> from the given <code>DexFile</code> for the given * values * @param dexFile The <code>DexFile</code> that this item belongs to * @param classType the class that the method is a member of * @param methodPrototype the type of the method * @param methodName the name of the method * @return a <code>MethodIdItem</code> from the given <code>DexFile</code> for the given * values, or null if it doesn't exist */ public static MethodIdItem lookupMethodIdItem(DexFile dexFile, TypeIdItem classType, ProtoIdItem methodPrototype, StringIdItem methodName) { MethodIdItem methodIdItem = new MethodIdItem(dexFile, classType, methodPrototype, methodName); return dexFile.MethodIdsSection.getInternedItem(methodIdItem); }
/** * Looks up the <code>StringIdItem</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 stringValue The string value to look up * @return a <code>StringIdItem</code> from the given <code>DexFile</code> for the given * string value, or null if it doesn't exist */ public static StringIdItem lookupStringIdItem(DexFile dexFile, String stringValue) { StringDataItem stringDataItem = StringDataItem.lookupStringDataItem(dexFile, stringValue); if (stringDataItem == null) { return null; } StringIdItem stringIdItem = new StringIdItem(dexFile, stringDataItem); return dexFile.StringIdsSection.getInternedItem(stringIdItem); }
/** * 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); }