public Section openSection(int offset) { return dexBuf.open(offset); }
@Override public ProtoId get(int index) { checkBounds(index, tableOfContents.protoIds.size); return open(tableOfContents.protoIds.off + (SizeOf.PROTO_ID_ITEM * index)) .readProtoId(); } @Override public int size() {
@Override public FieldId get(int index) { checkBounds(index, tableOfContents.fieldIds.size); return open(tableOfContents.fieldIds.off + (SizeOf.MEMBER_ID_ITEM * index)) .readFieldId(); } @Override public int size() {
@Override public MethodId get(int index) { checkBounds(index, tableOfContents.methodIds.size); return open(tableOfContents.methodIds.off + (SizeOf.MEMBER_ID_ITEM * index)) .readMethodId(); } @Override public int size() {
public TypeList readTypeList(int offset) { if (offset == 0) { return TypeList.EMPTY; } return open(offset).readTypeList(); }
public ClassData readClassData(ClassDef classDef) { int offset = classDef.getClassDataOffset(); if (offset == 0) { throw new IllegalArgumentException("offset == 0"); } return open(offset).readClassData(); }
@Override public FieldId get(int index) { checkBounds(index, tableOfContents.fieldIds.size); return open(tableOfContents.fieldIds.off + (SizeOf.MEMBER_ID_ITEM * index)) .readFieldId(); } @Override
@Override public FieldId get(int index) { checkBounds(index, tableOfContents.fieldIds.size); return open(tableOfContents.fieldIds.off + (SizeOf.MEMBER_ID_ITEM * index)) .readFieldId(); } @Override public int size() {
public ClassData readClassData(ClassDef classDef) { int offset = classDef.getClassDataOffset(); if (offset == 0) { throw new IllegalArgumentException("offset == 0"); } return open(offset).readClassData(); }
@Override public String get(int index) { checkBounds(index, tableOfContents.stringIds.size); return open(tableOfContents.stringIds.off + (index * SizeOf.STRING_ID_ITEM)) .readString(); } @Override public int size() {
@Override public MethodId get(int index) { checkBounds(index, tableOfContents.methodIds.size); return open(tableOfContents.methodIds.off + (SizeOf.MEMBER_ID_ITEM * index)) .readMethodId(); } @Override public int size() {
private void transformStaticValues(Dex in, IndexMap indexMap) { TableOfContents.Section section = in.getTableOfContents().encodedArrays; if (section.exists()) { Dex.Section staticValuesIn = in.open(section.off); for (int i = 0; i < section.size; i++) { transformStaticValues(staticValuesIn, indexMap); } } }
private void transformAnnotationSets(Dex in, IndexMap indexMap) { TableOfContents.Section section = in.getTableOfContents().annotationSets; if (section.exists()) { Dex.Section setIn = in.open(section.off); for (int i = 0; i < section.size; i++) { transformAnnotationSet(indexMap, setIn); } } }
private void transformAnnotationSets(Dex in, IndexMap indexMap) { TableOfContents.Section section = in.getTableOfContents().annotationSets; if (section.exists()) { Dex.Section setIn = in.open(section.off); for (int i = 0; i < section.size; i++) { transformAnnotationSet(indexMap, setIn); } } }
private void transformAnnotationDirectories(Dex in, IndexMap indexMap) { TableOfContents.Section section = in.getTableOfContents().annotationsDirectories; if (section.exists()) { Dex.Section directoryIn = in.open(section.off); for (int i = 0; i < section.size; i++) { transformAnnotationDirectory(directoryIn, indexMap); } } }
private void transformAnnotationDirectories(Dex in, IndexMap indexMap) { TableOfContents.Section section = in.getTableOfContents().annotationsDirectories; if (section.exists()) { Dex.Section directoryIn = in.open(section.off); for (int i = 0; i < section.size; i++) { transformAnnotationDirectory(directoryIn, indexMap); } } }
private void transformStaticValues(Dex in, IndexMap indexMap) { TableOfContents.Section section = in.getTableOfContents().encodedArrays; if (section.exists()) { Dex.Section staticValuesIn = in.open(section.off); for (int i = 0; i < section.size; i++) { transformStaticValues(staticValuesIn, indexMap); } } }
private void transformAnnotationSets(Dex in, IndexMap indexMap) { TableOfContents.Section section = in.getTableOfContents().annotationSets; if (section.exists()) { Dex.Section setIn = in.open(section.off); for (int i = 0; i < section.size; i++) { transformAnnotationSet(indexMap, setIn); } } }