@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 void visitFieldInsn( final int opcode, final String owner, final String name, final String descriptor) { super.visitFieldInsn( opcode, remapper.mapType(owner), remapper.mapFieldName(owner, name, descriptor), remapper.mapDesc(descriptor)); }
@Override public AnnotationVisitor visitInsnAnnotation( final int typeRef, final TypePath typePath, final String descriptor, final boolean visible) { AnnotationVisitor annotationVisitor = super.visitInsnAnnotation(typeRef, typePath, remapper.mapDesc(descriptor), visible); return annotationVisitor == null ? annotationVisitor : new RemappingAnnotationAdapter(annotationVisitor, remapper); }
@Override public AnnotationVisitor visitTypeAnnotation( final int typeRef, final TypePath typePath, final String descriptor, final boolean visible) { AnnotationVisitor annotationVisitor = super.visitTypeAnnotation(typeRef, typePath, remapper.mapDesc(descriptor), visible); return annotationVisitor == null ? null : createRemappingAnnotationAdapter(annotationVisitor); }
@Override public AnnotationVisitor visitAnnotation(final String name, final String descriptor) { AnnotationVisitor annotationVisitor = super.visitAnnotation(name, remapper.mapDesc(descriptor)); if (annotationVisitor == null) { return null; } else { return annotationVisitor == av ? this : new AnnotationRemapper(api, annotationVisitor, remapper); } }
@Override public AnnotationVisitor visitTypeAnnotation( final int typeRef, final TypePath typePath, final String descriptor, final boolean visible) { AnnotationVisitor annotationVisitor = super.visitTypeAnnotation(typeRef, typePath, remapper.mapDesc(descriptor), visible); return annotationVisitor == null ? null : createAnnotationRemapper(annotationVisitor); }
@Override public AnnotationVisitor visitParameterAnnotation( final int parameter, final String descriptor, final boolean visible) { AnnotationVisitor annotationVisitor = super.visitParameterAnnotation(parameter, remapper.mapDesc(descriptor), visible); return annotationVisitor == null ? annotationVisitor : new AnnotationRemapper(api, annotationVisitor, remapper); }
@Override public AnnotationVisitor visitAnnotation(final String descriptor, final boolean visible) { AnnotationVisitor annotationVisitor = super.visitAnnotation(remapper.mapDesc(descriptor), visible); return annotationVisitor == null ? null : new AnnotationRemapper(api, annotationVisitor, remapper); }
@Override public AnnotationVisitor visitAnnotation(final String descriptor, final boolean visible) { AnnotationVisitor annotationVisitor = super.visitAnnotation(remapper.mapDesc(descriptor), visible); return annotationVisitor == null ? annotationVisitor : new RemappingAnnotationAdapter(annotationVisitor, remapper); }
@Override public AnnotationVisitor visitTypeAnnotation( final int typeRef, final TypePath typePath, final String descriptor, final boolean visible) { AnnotationVisitor annotationVisitor = super.visitTypeAnnotation(typeRef, typePath, remapper.mapDesc(descriptor), visible); return annotationVisitor == null ? annotationVisitor : new RemappingAnnotationAdapter(annotationVisitor, remapper); }
@Override public AnnotationVisitor visitParameterAnnotation( final int parameter, final String descriptor, final boolean visible) { AnnotationVisitor annotationVisitor = super.visitParameterAnnotation(parameter, remapper.mapDesc(descriptor), visible); return annotationVisitor == null ? annotationVisitor : new RemappingAnnotationAdapter(annotationVisitor, remapper); }
@Override public AnnotationVisitor visitAnnotation(final String descriptor, final boolean visible) { AnnotationVisitor annotationVisitor = super.visitAnnotation(remapper.mapDesc(descriptor), visible); return annotationVisitor == null ? null : createAnnotationRemapper(annotationVisitor); }
@Override public AnnotationVisitor visitTryCatchAnnotation( final int typeRef, final TypePath typePath, final String descriptor, final boolean visible) { AnnotationVisitor annotationVisitor = super.visitTryCatchAnnotation(typeRef, typePath, remapper.mapDesc(descriptor), visible); return annotationVisitor == null ? annotationVisitor : new RemappingAnnotationAdapter(annotationVisitor, remapper); }
@Override public AnnotationVisitor visitTypeAnnotation( final int typeRef, final TypePath typePath, final String descriptor, final boolean visible) { AnnotationVisitor annotationVisitor = super.visitTypeAnnotation(typeRef, typePath, remapper.mapDesc(descriptor), visible); return annotationVisitor == null ? null : new RemappingAnnotationAdapter(annotationVisitor, remapper); } }
@Override public AnnotationVisitor visitAnnotation(final String descriptor, final boolean visible) { AnnotationVisitor annotationVisitor = super.visitAnnotation(remapper.mapDesc(descriptor), visible); return annotationVisitor == null ? annotationVisitor : new AnnotationRemapper(api, annotationVisitor, remapper); }
@Override public AnnotationVisitor visitInsnAnnotation( final int typeRef, final TypePath typePath, final String descriptor, final boolean visible) { AnnotationVisitor annotationVisitor = super.visitInsnAnnotation(typeRef, typePath, remapper.mapDesc(descriptor), visible); return annotationVisitor == null ? annotationVisitor : new AnnotationRemapper(api, annotationVisitor, remapper); }
@Override public void visitLocalVariable(String name, String desc, String signature, Label start, Label end, int index) { super.visitLocalVariable(name, remapper.mapDesc(desc), remapper.mapSignature(signature, true), start, end, index); }
@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 ? av : new RemappingAnnotationAdapter(av, remapper); } }
@Override public void visitLocalVariable(String name, String desc, String signature, Label start, Label end, int index) { super.visitLocalVariable(name, remapper.mapDesc(desc), remapper.mapSignature(signature, true), start, end, index); }
@Override public void visitFieldInsn( final int opcode, final String owner, final String name, final String descriptor) { super.visitFieldInsn( opcode, remapper.mapType(owner), remapper.mapFieldName(owner, name, descriptor), remapper.mapDesc(descriptor)); }