Search in sources :

Example 6 with AnnotatedBytes

use of org.jf.dexlib2.util.AnnotatedBytes in project smali by JesusFreke.

the class EncodedArrayItem method makeAnnotator.

@Nonnull
public static SectionAnnotator makeAnnotator(@Nonnull DexAnnotator annotator, @Nonnull MapItem mapItem) {
    return new SectionAnnotator(annotator, mapItem) {

        @Nonnull
        @Override
        public String getItemName() {
            return "encoded_array_item";
        }

        @Override
        protected void annotateItem(@Nonnull AnnotatedBytes out, int itemIndex, @Nullable String itemIdentity) {
            DexReader reader = dexFile.readerAt(out.getCursor());
            EncodedValue.annotateEncodedArray(out, reader);
        }
    };
}
Also used : DexReader(org.jf.dexlib2.dexbacked.DexReader) Nonnull(javax.annotation.Nonnull) AnnotatedBytes(org.jf.dexlib2.util.AnnotatedBytes) Nullable(javax.annotation.Nullable) Nonnull(javax.annotation.Nonnull)

Aggregations

Nonnull (javax.annotation.Nonnull)6 Nullable (javax.annotation.Nullable)6 DexReader (org.jf.dexlib2.dexbacked.DexReader)6 AnnotatedBytes (org.jf.dexlib2.util.AnnotatedBytes)6 DexBackedInstruction (org.jf.dexlib2.dexbacked.instruction.DexBackedInstruction)1 ExceptionWithContext (org.jf.util.ExceptionWithContext)1