private void transformMethods(Dex in, IndexMap indexMap, ClassData.Method[] methods) { int lastOutMethodIndex = 0; for (ClassData.Method method : methods) { int outMethodIndex = indexMap.adjustMethod(method.getMethodIndex()); classDataOut.writeUleb128(outMethodIndex - lastOutMethodIndex); lastOutMethodIndex = outMethodIndex; classDataOut.writeUleb128(method.getAccessFlags()); if (method.getCodeOffset() == 0) { classDataOut.writeUleb128(0); } else { codeOut.alignToFourBytesWithZeroFill(); classDataOut.writeUleb128(codeOut.getPosition()); transformCode(in, in.readCode(method), indexMap); } } }
private void transformMethods(Dex in, IndexMap indexMap, ClassData.Method[] methods) { int lastOutMethodIndex = 0; for (ClassData.Method method : methods) { int outMethodIndex = indexMap.adjustMethod(method.getMethodIndex()); classDataOut.writeUleb128(outMethodIndex - lastOutMethodIndex); lastOutMethodIndex = outMethodIndex; classDataOut.writeUleb128(method.getAccessFlags()); if (method.getCodeOffset() == 0) { classDataOut.writeUleb128(0); } else { codeOut.alignToFourBytesWithZeroFill(); classDataOut.writeUleb128(codeOut.getPosition()); transformCode(in, in.readCode(method), indexMap); } } }
private void transformMethods(Dex in, IndexMap indexMap, ClassData.Method[] methods) { int lastOutMethodIndex = 0; for (ClassData.Method method : methods) { int outMethodIndex = indexMap.adjustMethod(method.getMethodIndex()); classDataOut.writeUleb128(outMethodIndex - lastOutMethodIndex); lastOutMethodIndex = outMethodIndex; classDataOut.writeUleb128(method.getAccessFlags()); if (method.getCodeOffset() == 0) { classDataOut.writeUleb128(0); } else { codeOut.alignToFourBytesWithZeroFill(); classDataOut.writeUleb128(codeOut.getPosition()); transformCode(in, in.readCode(method), indexMap); } } }
public void writeTypeList(TypeList typeList) { short[] types = typeList.getTypes(); writeInt(types.length); for (short type : types) { writeShort(type); } alignToFourBytesWithZeroFill(); }
public void writeTypeList(TypeList typeList) { short[] types = typeList.getTypes(); writeInt(types.length); for (short type : types) { writeShort(type); } alignToFourBytesWithZeroFill(); }