@Override protected Integer nextItem(DexDataBuffer section) { return section.readInt(); }
@Override protected Integer nextItem(DexDataBuffer section) { return section.readInt(); }
public ClassDef readClassDef() { int off = position(); int type = readInt(); int accessFlags = readInt(); int supertype = readInt(); int interfacesOffset = readInt(); int sourceFileIndex = readInt(); int annotationsOffset = readInt(); int classDataOffset = readInt(); int staticValuesOffset = readInt(); return new ClassDef(off, type, accessFlags, supertype, interfacesOffset, sourceFileIndex, annotationsOffset, classDataOffset, staticValuesOffset); }
public AnnotationsDirectory readAnnotationsDirectory() { int off = data.position(); int classAnnotationsOffset = readInt(); int fieldsSize = readInt(); int methodsSize = readInt(); int parameterListSize = readInt(); int[][] fieldAnnotations = new int[fieldsSize][2]; for (int i = 0; i < fieldsSize; ++i) { // field index fieldAnnotations[i][0] = readInt(); // annotations offset fieldAnnotations[i][1] = readInt(); } int[][] methodAnnotations = new int[methodsSize][2]; for (int i = 0; i < methodsSize; ++i) { // method index methodAnnotations[i][0] = readInt(); // annotation set offset methodAnnotations[i][1] = readInt(); } int[][] parameterAnnotations = new int[parameterListSize][2]; for (int i = 0; i < parameterListSize; ++i) { // method index parameterAnnotations[i][0] = readInt(); // annotations offset parameterAnnotations[i][1] = readInt(); } return new AnnotationsDirectory(off, classAnnotationsOffset, fieldAnnotations, methodAnnotations, parameterAnnotations); }
this.patchedDexSize = this.buffer.readInt(); this.firstChunkOffset = this.buffer.readInt(); this.patchedStringIdSectionOffset = this.buffer.readInt(); this.patchedTypeIdSectionOffset = this.buffer.readInt(); this.patchedProtoIdSectionOffset = this.buffer.readInt(); this.patchedFieldIdSectionOffset = this.buffer.readInt(); this.patchedMethodIdSectionOffset = this.buffer.readInt(); this.patchedClassDefSectionOffset = this.buffer.readInt(); this.patchedMapListSectionOffset = this.buffer.readInt(); this.patchedTypeListSectionOffset = this.buffer.readInt(); this.patchedAnnotationSetRefListSectionOffset = this.buffer.readInt(); this.patchedAnnotationSetSectionOffset = this.buffer.readInt(); this.patchedClassDataSectionOffset = this.buffer.readInt(); this.patchedCodeSectionOffset = this.buffer.readInt(); this.patchedStringDataSectionOffset = this.buffer.readInt(); this.patchedDebugInfoSectionOffset = this.buffer.readInt(); this.patchedAnnotationSectionOffset = this.buffer.readInt(); this.patchedEncodedArraySectionOffset = this.buffer.readInt(); this.patchedAnnotationsDirectorySectionOffset = this.buffer.readInt(); this.oldDexSignature = this.buffer.readByteArray(SizeOf.SIGNATURE);
public TypeList readTypeList() { int off = data.position(); int size = readInt(); short[] types = readShortArray(size); return new TypeList(off, types); }
public FieldId readFieldId() { int off = data.position(); int declaringClassIndex = readUnsignedShort(); int typeIndex = readUnsignedShort(); int nameIndex = readInt(); return new FieldId(off, declaringClassIndex, typeIndex, nameIndex); }
public MethodId readMethodId() { int off = data.position(); int declaringClassIndex = readUnsignedShort(); int protoIndex = readUnsignedShort(); int nameIndex = readInt(); return new MethodId(off, declaringClassIndex, protoIndex, nameIndex); }
private Code.Try[] readTries(int triesSize, Code.CatchHandler[] catchHandlers) { Code.Try[] result = new Code.Try[triesSize]; for (int i = 0; i < triesSize; i++) { int startAddress = readInt(); int instructionCount = readUnsignedShort(); int handlerOffset = readUnsignedShort(); int catchHandlerIndex = findCatchHandlerIndex(catchHandlers, handlerOffset); result[i] = new Code.Try(startAddress, instructionCount, catchHandlerIndex); } return result; }
@Override public Integer dumpItem(DexDataBuffer dexDataBuffer) { return dexDataBuffer.readInt(); } }
@Override protected Integer nextItem(DexDataBuffer section) { return section.readInt(); }
public TypeList readTypeList() { int off = data.position(); int size = readInt(); short[] types = readShortArray(size); return new TypeList(off, types); }
public FieldId readFieldId() { int off = data.position(); int declaringClassIndex = readUnsignedShort(); int typeIndex = readUnsignedShort(); int nameIndex = readInt(); return new FieldId(off, declaringClassIndex, typeIndex, nameIndex); }
public MethodId readMethodId() { int off = data.position(); int declaringClassIndex = readUnsignedShort(); int protoIndex = readUnsignedShort(); int nameIndex = readInt(); return new MethodId(off, declaringClassIndex, protoIndex, nameIndex); }
private Code.Try[] readTries(int triesSize, Code.CatchHandler[] catchHandlers) { Code.Try[] result = new Code.Try[triesSize]; for (int i = 0; i < triesSize; i++) { int startAddress = readInt(); int instructionCount = readUnsignedShort(); int handlerOffset = readUnsignedShort(); int catchHandlerIndex = findCatchHandlerIndex(catchHandlers, handlerOffset); result[i] = new Code.Try(startAddress, instructionCount, catchHandlerIndex); } return result; }