@Override protected void annotateItem(@Nonnull AnnotatedBytes out, int itemIndex, @Nullable String itemIdentity) { int itemType = dexFile.readUshort(out.getCursor()); out.annotate(2, "type = 0x%x: %s", itemType, ItemType.getItemTypeName(itemType)); out.annotate(2, "unused"); int size = dexFile.readSmallUint(out.getCursor()); out.annotate(4, "size = %d", size); int offset = dexFile.readSmallUint(out.getCursor()); out.annotate(4, "offset = 0x%x", offset); }
@Override public void annotateItem(@Nonnull AnnotatedBytes out, int itemIndex, @Nullable String itemIdentity) { int classIndex = dexFile.readUshort(out.getCursor()); out.annotate(2, "class_idx = %s", TypeIdItem.getReferenceAnnotation(dexFile, classIndex)); int protoIndex = dexFile.readUshort(out.getCursor()); out.annotate(2, "proto_idx = %s", ProtoIdItem.getReferenceAnnotation(dexFile, protoIndex)); int nameIndex = dexFile.readSmallUint(out.getCursor()); out.annotate(4, "name_idx = %s", StringIdItem.getReferenceAnnotation(dexFile, nameIndex)); } };
@Override protected void annotateItem(@Nonnull AnnotatedBytes out, int itemIndex, @Nullable String itemIdentity) { int size = dexFile.readSmallUint(out.getCursor()); out.annotate(4, "size: %d", size); for (int i=0; i<size; i++) { int typeIndex = dexFile.readUshort(out.getCursor()); out.annotate(2, TypeIdItem.getReferenceAnnotation(dexFile, typeIndex)); } }
@Override protected void annotateItem(@Nonnull AnnotatedBytes out, int itemIndex, @Nullable String itemIdentity) { int size = dexFile.readSmallUint(out.getCursor()); out.annotate(4, "size: %d", size); for (int i=0; i<size; i++) { int typeIndex = dexFile.readUshort(out.getCursor()); out.annotate(2, TypeIdItem.getReferenceAnnotation(dexFile, typeIndex)); } }
@Override public void annotateItem(@Nonnull AnnotatedBytes out, int itemIndex, @Nullable String itemIdentity) { int classIndex = dexFile.readUshort(out.getCursor()); out.annotate(2, "class_idx = %s", TypeIdItem.getReferenceAnnotation(dexFile, classIndex)); int protoIndex = dexFile.readUshort(out.getCursor()); out.annotate(2, "proto_idx = %s", ProtoIdItem.getReferenceAnnotation(dexFile, protoIndex)); int nameIndex = dexFile.readSmallUint(out.getCursor()); out.annotate(4, "name_idx = %s", StringIdItem.getReferenceAnnotation(dexFile, nameIndex)); } };
@Override protected void annotateItem(@Nonnull AnnotatedBytes out, int itemIndex, @Nullable String itemIdentity) { int classIndex = dexFile.readUshort(out.getCursor()); out.annotate(2, "class_idx = %s", TypeIdItem.getReferenceAnnotation(dexFile, classIndex)); int typeIndex = dexFile.readUshort(out.getCursor()); out.annotate(2, "return_type_idx = %s", TypeIdItem.getReferenceAnnotation(dexFile, typeIndex)); int nameIndex = dexFile.readSmallUint(out.getCursor()); out.annotate(4, "name_idx = %s", StringIdItem.getReferenceAnnotation(dexFile, nameIndex)); } };
@Override protected void annotateItem(@Nonnull AnnotatedBytes out, int itemIndex, @Nullable String itemIdentity) { int size = dexFile.readSmallUint(out.getCursor()); out.annotate(4, "size: %d", size); for (int i=0; i<size; i++) { int typeIndex = dexFile.readUshort(out.getCursor()); out.annotate(2, TypeIdItem.getReferenceAnnotation(dexFile, typeIndex)); } }
@Override protected void annotateItem(@Nonnull AnnotatedBytes out, int itemIndex, @Nullable String itemIdentity) { int classIndex = dexFile.readUshort(out.getCursor()); out.annotate(2, "class_idx = %s", TypeIdItem.getReferenceAnnotation(dexFile, classIndex)); int typeIndex = dexFile.readUshort(out.getCursor()); out.annotate(2, "return_type_idx = %s", TypeIdItem.getReferenceAnnotation(dexFile, typeIndex)); int nameIndex = dexFile.readSmallUint(out.getCursor()); out.annotate(4, "name_idx = %s", StringIdItem.getReferenceAnnotation(dexFile, nameIndex)); } };
@Override public void annotateItem(@Nonnull AnnotatedBytes out, int itemIndex, @Nullable String itemIdentity) { int classIndex = dexFile.readUshort(out.getCursor()); out.annotate(2, "class_idx = %s", TypeIdItem.getReferenceAnnotation(dexFile, classIndex)); int protoIndex = dexFile.readUshort(out.getCursor()); out.annotate(2, "proto_idx = %s", ProtoIdItem.getReferenceAnnotation(dexFile, protoIndex)); int nameIndex = dexFile.readSmallUint(out.getCursor()); out.annotate(4, "name_idx = %s", StringIdItem.getReferenceAnnotation(dexFile, nameIndex)); } };
@Override protected void annotateItem(@Nonnull AnnotatedBytes out, int itemIndex, @Nullable String itemIdentity) { int classIndex = dexFile.readUshort(out.getCursor()); out.annotate(2, "class_idx = %s", TypeIdItem.getReferenceAnnotation(dexFile, classIndex)); int typeIndex = dexFile.readUshort(out.getCursor()); out.annotate(2, "return_type_idx = %s", TypeIdItem.getReferenceAnnotation(dexFile, typeIndex)); int nameIndex = dexFile.readSmallUint(out.getCursor()); out.annotate(4, "name_idx = %s", StringIdItem.getReferenceAnnotation(dexFile, nameIndex)); } };
@Override protected void annotateItem(AnnotatedBytes out, int itemIndex, String itemIdentity) { int classIndex = dexFile.readUshort(out.getCursor()); out.annotate(2, "class_idx = %s", TypeIdItem.getReferenceAnnotation(dexFile, classIndex)); int typeIndex = dexFile.readUshort(out.getCursor()); out.annotate(2, "return_type_idx = %s", TypeIdItem.getReferenceAnnotation(dexFile, typeIndex)); int nameIndex = dexFile.readSmallUint(out.getCursor()); out.annotate(4, "name_idx = %s", StringIdItem.getReferenceAnnotation(dexFile, nameIndex)); } };
@Override protected void annotateItem(@Nonnull AnnotatedBytes out, int itemIndex, @Nullable String itemIdentity) { int methodHandleType = dexFile.readUshort(out.getCursor()); out.annotate(2, "type = %s", MethodHandleType.toString(methodHandleType)); out.annotate(2, "unused"); int fieldOrMethodId = dexFile.readUshort(out.getCursor()); String fieldOrMethodDescriptor; switch (methodHandleType) { case MethodHandleType.STATIC_PUT: case MethodHandleType.STATIC_GET: case MethodHandleType.INSTANCE_PUT: case MethodHandleType.INSTANCE_GET: fieldOrMethodDescriptor = FieldIdItem.getReferenceAnnotation(dexFile, fieldOrMethodId); break; case MethodHandleType.INVOKE_STATIC: case MethodHandleType.INVOKE_INSTANCE: case MethodHandleType.INVOKE_CONSTRUCTOR: case MethodHandleType.INVOKE_DIRECT: case MethodHandleType.INVOKE_INTERFACE: fieldOrMethodDescriptor = MethodIdItem.getReferenceAnnotation(dexFile, fieldOrMethodId); break; default: throw new ExceptionWithContext("Invalid method handle type: %d", methodHandleType); } out.annotate(2, "field_or_method_id = %s", fieldOrMethodDescriptor); out.annotate(2, "unused"); } };
@Override protected void annotateItem(@Nonnull AnnotatedBytes out, int itemIndex, @Nullable String itemIdentity) { int itemType = dexFile.readUshort(out.getCursor()); out.annotate(2, "type = 0x%x: %s", itemType, ItemType.getItemTypeName(itemType)); out.annotate(2, "unused"); int size = dexFile.readSmallUint(out.getCursor()); out.annotate(4, "size = %d", size); int offset = dexFile.readSmallUint(out.getCursor()); out.annotate(4, "offset = 0x%x", offset); }
@Override protected void annotateItem(@Nonnull AnnotatedBytes out, int itemIndex, @Nullable String itemIdentity) { int itemType = dexFile.readUshort(out.getCursor()); out.annotate(2, "type = 0x%x: %s", itemType, ItemType.getItemTypeName(itemType)); out.annotate(2, "unused"); int size = dexFile.readSmallUint(out.getCursor()); out.annotate(4, "size = %d", size); int offset = dexFile.readSmallUint(out.getCursor()); out.annotate(4, "offset = 0x%x", offset); }
@Override protected void annotateItem(@Nonnull AnnotatedBytes out, int itemIndex, @Nullable String itemIdentity) { int methodHandleType = dexFile.readUshort(out.getCursor()); out.annotate(2, "type = %s", MethodHandleType.toString(methodHandleType)); out.annotate(2, "unused"); int fieldOrMethodId = dexFile.readUshort(out.getCursor()); String fieldOrMethodDescriptor; switch (methodHandleType) { case MethodHandleType.STATIC_PUT: case MethodHandleType.STATIC_GET: case MethodHandleType.INSTANCE_PUT: case MethodHandleType.INSTANCE_GET: fieldOrMethodDescriptor = FieldIdItem.getReferenceAnnotation(dexFile, fieldOrMethodId); break; case MethodHandleType.INVOKE_STATIC: case MethodHandleType.INVOKE_INSTANCE: case MethodHandleType.INVOKE_CONSTRUCTOR: case MethodHandleType.INVOKE_DIRECT: case MethodHandleType.INVOKE_INTERFACE: fieldOrMethodDescriptor = MethodIdItem.getReferenceAnnotation(dexFile, fieldOrMethodId); break; default: throw new ExceptionWithContext("Invalid method handle type: %d", methodHandleType); } out.annotate(2, "field_or_method_id = %s", fieldOrMethodDescriptor); out.annotate(2, "unused"); } };