public Annotation adjust(Annotation annotation) { final ByteArrayOutputStream baos = new ByteArrayOutputStream(annotation.encodedAnnotation.data.length); new EncodedValueTransformer( new ByteOutput() { @Override public void writeByte(int i) { baos.write(i); } } ).transformAnnotation(annotation.getReader()); return new Annotation( annotation.off, annotation.visibility, new EncodedValue(annotation.encodedAnnotation.off, baos.toByteArray()) ); }
@Override protected int getItemSize(Annotation item) { return item.byteCountInDex(); }
public int getTypeIndex() { EncodedValueReader reader = getReader(); reader.readAnnotation(); return reader.getAnnotationType(); }
public Annotation readAnnotation() { int off = data.position(); byte visibility = readByte(); int start = data.position(); new EncodedValueReader(this, EncodedValueReader.ENCODED_ANNOTATION).skipValue(); return new Annotation(off, visibility, new EncodedValue(start, getBytesFrom(start))); }
private boolean isSameAnnotation( Dex oldDex, Dex newDex, int oldAnnotationOffset, int newAnnotationOffset ) { Annotation oldAnnotation = oldDex.openSection(oldAnnotationOffset).readAnnotation(); Annotation newAnnotation = newDex.openSection(newAnnotationOffset).readAnnotation(); if (oldAnnotation.visibility != newAnnotation.visibility) { return false; } EncodedValueReader oldAnnoReader = oldAnnotation.getReader(); EncodedValueReader newAnnoReader = newAnnotation.getReader(); return isSameAnnotationByReader(oldDex, newDex, oldAnnoReader, newAnnoReader); }
public Annotation readAnnotation() { int off = data.position(); byte visibility = readByte(); int start = data.position(); new EncodedValueReader(this, EncodedValueReader.ENCODED_ANNOTATION).skipValue(); return new Annotation(off, visibility, new EncodedValue(start, getBytesFrom(start))); }
public Annotation adjust(Annotation annotation) { final ByteArrayOutputStream baos = new ByteArrayOutputStream(annotation.encodedAnnotation.data.length); new EncodedValueTransformer( new ByteOutput() { @Override public void writeByte(int i) { baos.write(i); } } ).transformAnnotation(annotation.getReader()); return new Annotation( annotation.off, annotation.visibility, new EncodedValue(annotation.encodedAnnotation.off, baos.toByteArray()) ); }
public int getTypeIndex() { EncodedValueReader reader = getReader(); reader.readAnnotation(); return reader.getAnnotationType(); }
@Override protected int getItemSize(Annotation item) { return item.byteCountInDex(); }
public Annotation adjust(Annotation annotation) { final ByteArrayOutputStream baos = new ByteArrayOutputStream(annotation.encodedAnnotation.data.length); new EncodedValueTransformer( new ByteOutput() { @Override public void writeByte(int i) { baos.write(i); } } ).transformAnnotation(annotation.getReader()); return new Annotation( annotation.off, annotation.visibility, new EncodedValue(annotation.encodedAnnotation.off, baos.toByteArray()) ); }
private boolean isSameAnnotation( Dex oldDex, Dex newDex, int oldAnnotationOffset, int newAnnotationOffset ) { Annotation oldAnnotation = oldDex.openSection(oldAnnotationOffset).readAnnotation(); Annotation newAnnotation = newDex.openSection(newAnnotationOffset).readAnnotation(); if (oldAnnotation.visibility != newAnnotation.visibility) { return false; } EncodedValueReader oldAnnoReader = oldAnnotation.getReader(); EncodedValueReader newAnnoReader = newAnnotation.getReader(); return isSameAnnotationByReader(oldDex, newDex, oldAnnoReader, newAnnoReader); }
@Override protected int getItemSize(Annotation item) { return item.byteCountInDex(); }
@Override protected int getItemSize(Annotation item) { return item.byteCountInDex(); }