public int getCallSiteCount() { MapItem mapItem = getMapItemForSection(ItemType.CALL_SITE_ID_ITEM); if (mapItem == null) { return 0; } return mapItem.getItemCount(); }
public int getMethodHandleCount() { MapItem mapItem = getMapItemForSection(ItemType.METHOD_HANDLE_ITEM); if (mapItem == null) { return 0; } return mapItem.getItemCount(); }
public static String[] getStrings(@Nonnull RawDexFile dexFile) { MapItem mapItem = dexFile.getMapItemForSection(ItemType.STRING_ID_ITEM); if (mapItem == null) { return new String[0]; } int stringCount = mapItem.getItemCount(); String[] ret = new String[stringCount]; for (int i=0; i<stringCount; i++) { ret[i] = dexFile.getString(i); } return ret; } }
public int getCallSiteIdItemOffset(int callSiteIndex) { MapItem mapItem = getMapItemForSection(ItemType.CALL_SITE_ID_ITEM); if (mapItem == null || callSiteIndex >= mapItem.getItemCount()) { throw new InvalidItemIndex(callSiteIndex, "Call site index out of bounds: %d", callSiteIndex); } return mapItem.getOffset() + callSiteIndex * CallSiteIdItem.ITEM_SIZE; }
public int getMethodHandleItemOffset(int methodHandleIndex) { MapItem mapItem = getMapItemForSection(ItemType.METHOD_HANDLE_ITEM); if (mapItem == null || methodHandleIndex >= mapItem.getItemCount()) { throw new InvalidItemIndex(methodHandleIndex , "Method handle index out of bounds: %d", methodHandleIndex); } return mapItem.getOffset() + methodHandleIndex * MethodHandleItem.ITEM_SIZE; }
public int getCallSiteCount() { MapItem mapItem = getMapItemForSection(ItemType.CALL_SITE_ID_ITEM); if (mapItem == null) { return 0; } return mapItem.getItemCount(); }
public int getMethodHandleCount() { MapItem mapItem = getMapItemForSection(ItemType.METHOD_HANDLE_ITEM); if (mapItem == null) { return 0; } return mapItem.getItemCount(); }
public SectionAnnotator(@Nonnull DexAnnotator annotator, @Nonnull MapItem mapItem) { this.annotator = annotator; this.dexFile = annotator.dexFile; this.itemType = mapItem.getType(); this.sectionOffset = mapItem.getOffset(); this.itemCount = mapItem.getItemCount(); }
public SectionAnnotator(@Nonnull DexAnnotator annotator, @Nonnull MapItem mapItem) { this.annotator = annotator; this.dexFile = annotator.dexFile; this.itemType = mapItem.getType(); this.sectionOffset = mapItem.getOffset(); this.itemCount = mapItem.getItemCount(); }
public SectionAnnotator(@Nonnull DexAnnotator annotator, @Nonnull MapItem mapItem) { this.annotator = annotator; this.dexFile = annotator.dexFile; this.itemType = mapItem.getType(); this.sectionOffset = mapItem.getOffset(); this.itemCount = mapItem.getItemCount(); }
public static String[] getFields(@Nonnull RawDexFile dexFile) { MapItem mapItem = dexFile.getMapItemForSection(ItemType.FIELD_ID_ITEM); if (mapItem == null) { return new String[0]; } int fieldCount = mapItem.getItemCount(); String[] ret = new String[fieldCount]; for (int i=0; i<fieldCount; i++) { ret[i] = asString(dexFile, i); } return ret; } }
public static String[] getTypes(@Nonnull RawDexFile dexFile) { MapItem mapItem = dexFile.getMapItemForSection(ItemType.TYPE_ID_ITEM); if (mapItem == null) { return new String[0]; } int typeCount = mapItem.getItemCount(); String[] ret = new String[typeCount]; for (int i=0; i<typeCount; i++) { ret[i] = dexFile.getType(i); } return ret; } }
public static String[] getFields(@Nonnull RawDexFile dexFile) { MapItem mapItem = dexFile.getMapItemForSection(ItemType.FIELD_ID_ITEM); if (mapItem == null) { return new String[0]; } int fieldCount = mapItem.getItemCount(); String[] ret = new String[fieldCount]; for (int i=0; i<fieldCount; i++) { ret[i] = asString(dexFile, i); } return ret; } }
public static String[] getProtos(@Nonnull RawDexFile dexFile) { MapItem mapItem = dexFile.getMapItemForSection(ItemType.PROTO_ID_ITEM); if (mapItem == null) { return new String[0]; } int protoCount = mapItem.getItemCount(); String[] ret = new String[protoCount]; for (int i=0; i<protoCount; i++) { ret[i] = asString(dexFile, i); } return ret; } }
public static String[] getStrings(@Nonnull RawDexFile dexFile) { MapItem mapItem = dexFile.getMapItemForSection(ItemType.STRING_ID_ITEM); if (mapItem == null) { return new String[0]; } int stringCount = mapItem.getItemCount(); String[] ret = new String[stringCount]; for (int i=0; i<stringCount; i++) { ret[i] = dexFile.getString(i); } return ret; } }
public static String[] getMethods(@Nonnull RawDexFile dexFile) { MapItem mapItem = dexFile.getMapItemForSection(ItemType.METHOD_ID_ITEM); if (mapItem == null) { return new String[0]; } int methodCount = mapItem.getItemCount(); String[] ret = new String[methodCount]; for (int i=0; i<methodCount; i++) { ret[i] = asString(dexFile, i); } return ret; } }
public static String[] getTypes(@Nonnull RawDexFile dexFile) { MapItem mapItem = dexFile.getMapItemForSection(ItemType.TYPE_ID_ITEM); if (mapItem == null) { return new String[0]; } int typeCount = mapItem.getItemCount(); String[] ret = new String[typeCount]; for (int i=0; i<typeCount; i++) { ret[i] = dexFile.getType(i); } return ret; } }
public static String[] getClasses(@Nonnull RawDexFile dexFile) { MapItem mapItem = dexFile.getMapItemForSection(ItemType.CLASS_DEF_ITEM); if (mapItem == null) { return new String[0]; } int classCount = mapItem.getItemCount(); String[] ret = new String[classCount]; for (int i=0; i<classCount; i++) { ret[i] = asString(dexFile, i); } return ret; } }
public int getCallSiteIdItemOffset(int callSiteIndex) { MapItem mapItem = getMapItemForSection(ItemType.CALL_SITE_ID_ITEM); if (mapItem == null || callSiteIndex >= mapItem.getItemCount()) { throw new InvalidItemIndex(callSiteIndex, "Call site index out of bounds: %d", callSiteIndex); } return mapItem.getOffset() + callSiteIndex * CallSiteIdItem.ITEM_SIZE; }
public int getMethodHandleItemOffset(int methodHandleIndex) { MapItem mapItem = getMapItemForSection(ItemType.METHOD_HANDLE_ITEM); if (mapItem == null || methodHandleIndex >= mapItem.getItemCount()) { throw new InvalidItemIndex(methodHandleIndex , "Method handle index out of bounds: %d", methodHandleIndex); } return mapItem.getOffset() + methodHandleIndex * MethodHandleItem.ITEM_SIZE; }