@Override public AnnotationVisitor visitAnnotation(final String desc, final boolean visible) { AnnotationVisitor av = super.visitAnnotation(remapper.mapDesc(desc), visible); return av == null ? null : new RemappingAnnotationAdapter(av, remapper) { @Override public void visitEnum(String name, String enumDesc, String value) { if (Type.getType(enumDesc).getClassName().equals(RedefinitionPolicy.class.getName())) { RedefinitionPolicy valueAsEnum = RedefinitionPolicy.valueOf(value); if (Type.getType(desc).getClassName().equals(FieldRedefinitionPolicy.class.getName())) { cv.visitAttribute(new SingleByteAttribute(FieldRedefinitionPolicy.class.getSimpleName(), (byte) valueAsEnum.ordinal())); } if (Type.getType(desc).getClassName().equals(MethodRedefinitionPolicy.class.getName())) { cv.visitAttribute(new SingleByteAttribute(MethodRedefinitionPolicy.class.getSimpleName(), (byte) valueAsEnum.ordinal())); } } super.visitEnum(name, desc, value); } }; }
@Override public AnnotationVisitor visitAnnotationDefault() { AnnotationVisitor av = super.visitAnnotationDefault(); return av == null ? null : new RemappingAnnotationAdapter(av, remapper); }
@Override public AnnotationVisitor visitAnnotation(String desc, boolean visible) { AnnotationVisitor av = super.visitAnnotation(remapper.mapDesc(desc), visible); return av == null ? null : new RemappingAnnotationAdapter(av, remapper); }
@Override public AnnotationVisitor visitTypeAnnotation(int typeRef, TypePath typePath, String desc, boolean visible) { AnnotationVisitor av = super.visitTypeAnnotation(typeRef, typePath, remapper.mapDesc(desc), visible); return av == null ? null : new RemappingAnnotationAdapter(av, remapper); }
@Override public AnnotationVisitor visitParameterAnnotation(int parameter, String desc, boolean visible) { AnnotationVisitor av = super.visitParameterAnnotation(parameter, remapper.mapDesc(desc), visible); return av == null ? null : new RemappingAnnotationAdapter(av, remapper); }
@Override public AnnotationVisitor visitInsnAnnotation(int typeRef, TypePath typePath, String desc, boolean visible) { AnnotationVisitor av = super.visitInsnAnnotation(typeRef, typePath, remapper.mapDesc(desc), visible); return av == null ? null : new RemappingAnnotationAdapter(av, remapper); }
@Override public AnnotationVisitor visitTryCatchAnnotation(int typeRef, TypePath typePath, String desc, boolean visible) { AnnotationVisitor av = super.visitTryCatchAnnotation(typeRef, typePath, remapper.mapDesc(desc), visible); return av == null ? null : new RemappingAnnotationAdapter(av, remapper); }
@Override public AnnotationVisitor visitLocalVariableAnnotation(int typeRef, TypePath typePath, Label[] start, Label[] end, int[] index, String desc, boolean visible) { AnnotationVisitor av = super.visitLocalVariableAnnotation(typeRef, typePath, start, end, index, remapper.mapDesc(desc), visible); return av == null ? null : new RemappingAnnotationAdapter(av, remapper); }