private boolean isSameAnnotationByReader( Dex oldDex, Dex newDex, EncodedValueReader oldAnnoReader, EncodedValueReader newAnnoReader ) { int oldFieldCount = oldAnnoReader.readAnnotation(); int newFieldCount = newAnnoReader.readAnnotation(); if (oldFieldCount != newFieldCount) { return false; } int oldAnnoType = oldAnnoReader.getAnnotationType(); int newAnnoType = newAnnoReader.getAnnotationType(); if (!isSameClassDesc(oldDex, newDex, oldAnnoType, newAnnoType)) { return false; } for (int i = 0; i < oldFieldCount; ++i) { int oldAnnoNameIdx = oldAnnoReader.readAnnotationName(); int newAnnoNameIdx = newAnnoReader.readAnnotationName(); if (!isSameName(oldDex, newDex, oldAnnoNameIdx, newAnnoNameIdx)) { return false; } if (!isSameEncodedValue(oldDex, newDex, oldAnnoReader, newAnnoReader)) { return false; } } return true; }
private void transformAnnotation(EncodedValueReader reader) { int fieldCount = reader.readAnnotation(); Leb128.writeUnsignedLeb128(out, adjustTypeIdIndex(reader.getAnnotationType())); Leb128.writeUnsignedLeb128(out, fieldCount); for (int i = 0; i < fieldCount; i++) { Leb128.writeUnsignedLeb128(out, adjustStringIndex(reader.readAnnotationName())); transform(reader); } }
case ENCODED_ANNOTATION: for (int i = 0, size = readAnnotation(); i < size; i++) { readAnnotationName(); skipValue();
private boolean isSameAnnotationByReader( Dex oldDex, Dex newDex, EncodedValueReader oldAnnoReader, EncodedValueReader newAnnoReader ) { int oldFieldCount = oldAnnoReader.readAnnotation(); int newFieldCount = newAnnoReader.readAnnotation(); if (oldFieldCount != newFieldCount) { return false; } int oldAnnoType = oldAnnoReader.getAnnotationType(); int newAnnoType = newAnnoReader.getAnnotationType(); if (!isSameClassDesc(oldDex, newDex, oldAnnoType, newAnnoType)) { return false; } for (int i = 0; i < oldFieldCount; ++i) { int oldAnnoNameIdx = oldAnnoReader.readAnnotationName(); int newAnnoNameIdx = newAnnoReader.readAnnotationName(); if (!isSameName(oldDex, newDex, oldAnnoNameIdx, newAnnoNameIdx)) { return false; } if (!isSameEncodedValue(oldDex, newDex, oldAnnoReader, newAnnoReader)) { return false; } } return true; }
private void transformAnnotation(EncodedValueReader reader) { int fieldCount = reader.readAnnotation(); Leb128.writeUnsignedLeb128(out, adjustTypeIdIndex(reader.getAnnotationType())); Leb128.writeUnsignedLeb128(out, fieldCount); for (int i = 0; i < fieldCount; i++) { Leb128.writeUnsignedLeb128(out, adjustStringIndex(reader.readAnnotationName())); transform(reader); } }
private void transformAnnotation(EncodedValueReader reader) { int fieldCount = reader.readAnnotation(); Leb128.writeUnsignedLeb128(out, adjustTypeIdIndex(reader.getAnnotationType())); Leb128.writeUnsignedLeb128(out, fieldCount); for (int i = 0; i < fieldCount; i++) { Leb128.writeUnsignedLeb128(out, adjustStringIndex(reader.readAnnotationName())); transform(reader); } }
case ENCODED_ANNOTATION: for (int i = 0, size = readAnnotation(); i < size; i++) { readAnnotationName(); skipValue();