public void writeTo(Dex.Section out) { out.writeUnsignedShort(declaringClassIndex); out.writeUnsignedShort(protoIndex); out.writeInt(nameIndex); }
/** * Transform all annotations on a single type, member or parameter. */ private void transformAnnotationSet(IndexMap indexMap, Dex.Section setIn) { contentsOut.annotationSets.size++; annotationSetOut.assertFourByteAligned(); indexMap.putAnnotationSetOffset(setIn.getPosition(), annotationSetOut.getPosition()); int size = setIn.readInt(); annotationSetOut.writeInt(size); for (int j = 0; j < size; j++) { annotationSetOut.writeInt(indexMap.adjustAnnotation(setIn.readInt())); } }
/** * Transform all annotation set ref lists. */ private void transformAnnotationSetRefList(IndexMap indexMap, Dex.Section refListIn) { contentsOut.annotationSetRefLists.size++; annotationSetRefListOut.assertFourByteAligned(); indexMap.putAnnotationSetRefListOffset( refListIn.getPosition(), annotationSetRefListOut.getPosition()); int parameterCount = refListIn.readInt(); annotationSetRefListOut.writeInt(parameterCount); for (int p = 0; p < parameterCount; p++) { annotationSetRefListOut.writeInt(indexMap.adjustAnnotationSet(refListIn.readInt())); } }
/** * Transform all annotations on a single type, member or parameter. */ private void transformAnnotationSet(IndexMap indexMap, Dex.Section setIn) { contentsOut.annotationSets.size++; annotationSetOut.assertFourByteAligned(); indexMap.putAnnotationSetOffset(setIn.getPosition(), annotationSetOut.getPosition()); int size = setIn.readInt(); annotationSetOut.writeInt(size); for (int j = 0; j < size; j++) { annotationSetOut.writeInt(indexMap.adjustAnnotation(setIn.readInt())); } }
/** * Generates the signature and checksum of the dex file {@code out} and * writes them to the file. */ public void writeHashes() throws IOException { open(SIGNATURE_OFFSET).write(computeSignature()); open(CHECKSUM_OFFSET).writeInt(computeChecksum()); }
public void writeTo(Dex.Section out) { out.writeUnsignedShort(declaringClassIndex); out.writeUnsignedShort(typeIndex); out.writeInt(nameIndex); }
public void writeTypeList(TypeList typeList) { short[] types = typeList.getTypes(); writeInt(types.length); for (short type : types) { writeShort(type); } alignToFourBytesWithZeroFill(); }
private void transformTries(Dex.Section out, Code.Try[] tries, int[] catchHandlerOffsets) { for (Code.Try tryItem : tries) { out.writeInt(tryItem.getStartAddress()); out.writeUnsignedShort(tryItem.getInstructionCount()); out.writeUnsignedShort(catchHandlerOffsets[tryItem.getCatchHandlerIndex()]); } }
@Override void write(String value) { contentsOut.stringDatas.size++; idsDefsOut.writeInt(stringDataOut.getPosition()); stringDataOut.writeStringData(value); } }.mergeSorted();
/** * Generates the signature and checksum of the dex file {@code out} and * writes them to the file. */ public void writeHashes() throws IOException { open(SIGNATURE_OFFSET).write(computeSignature()); open(CHECKSUM_OFFSET).writeInt(computeChecksum()); }
public void writeTo(Dex.Section out) { out.writeUnsignedShort(declaringClassIndex); out.writeUnsignedShort(typeIndex); out.writeInt(nameIndex); }
public void writeTo(Dex.Section out) { out.writeUnsignedShort(declaringClassIndex); out.writeUnsignedShort(typeIndex); out.writeInt(nameIndex); }
@Override void write(String value) { contentsOut.stringDatas.size++; idsDefsOut.writeInt(stringDataOut.getPosition()); stringDataOut.writeStringData(value); } }.mergeSorted();
public void writeTo(Dex.Section out) { out.writeUnsignedShort(declaringClassIndex); out.writeUnsignedShort(protoIndex); out.writeInt(nameIndex); }
public void writeTo(Dex.Section out) { out.writeUnsignedShort(declaringClassIndex); out.writeUnsignedShort(protoIndex); out.writeInt(nameIndex); }
@Override void write(Integer value) { idsDefsOut.writeInt(value); } }.mergeSorted();
public void writeTypeList(TypeList typeList) { short[] types = typeList.getTypes(); writeInt(types.length); for (short type : types) { writeShort(type); } alignToFourBytesWithZeroFill(); }