@Test public void testVisitInnerClass() { ClassNode classNode = new ClassNode(); ClassRemapper remapper = new ClassRemapper( classNode, new Remapper() { @Override public String map(final String internalName) { if ("pkg/C".equals(internalName)) { return "a"; } if ("pkg/C$Inner".equals(internalName)) { return "a$b"; } return internalName; } }); remapper.visit(Opcodes.V1_5, Opcodes.ACC_PUBLIC, "pkg/C", null, "java/lang/Object", null); remapper.visitInnerClass("pkg/C$Inner", "pkg/C", "Inner", Opcodes.ACC_PUBLIC); assertEquals("a$b", classNode.innerClasses.get(0).name); assertEquals("a", classNode.innerClasses.get(0).outerName); assertEquals("b", classNode.innerClasses.get(0).innerName); }
@Override public void visitInnerClass( final String name, final String outerName, final String innerName, final int access) { super.visitInnerClass( remapper.mapType(name), outerName == null ? null : remapper.mapType(outerName), innerName == null ? null : remapper.mapInnerClassName(name, outerName, innerName), access); }
ClassRemapper extends ClassVisitor { @Override public void visitInnerClass( final String name, final String outerName, final String innerName, final int access) { super.visitInnerClass( remapper.mapType(name), outerName == null ? null : remapper.mapType(outerName), innerName == null ? null : remapper.mapInnerClassName(name, outerName, innerName), access); } }
ClassRemapper extends ClassVisitor { @Override public void visitInnerClass( final String name, final String outerName, final String innerName, final int access) { super.visitInnerClass( remapper.mapType(name), outerName == null ? null : remapper.mapType(outerName), innerName == null ? null : remapper.mapInnerClassName(name, outerName, innerName), access); } ClassRemapper(final ClassVisitor classVisitor, final Remapper remapper); protected  ClassRemapper(final int api, final ClassVisitor classVisitor, final Remapper remapper); }
ClassRemapper extends ClassVisitor { @Override public void visitInnerClass( final String name, final String outerName, final String innerName, final int access) { super.visitInnerClass( remapper.mapType(name), outerName == null ? null : remapper.mapType(outerName), innerName == null ? null : remapper.mapInnerClassName(name, outerName, innerName), access); } ClassRemapper(final ClassVisitor classVisitor, final Remapper remapper); protected  ClassRemapper(final int api, final ClassVisitor classVisitor, final Remapper remapper); @Override void visit(
      final int version,
      final int access,
      final String name,
      final String signature,
      final String superName,
      final String[] interfaces); @Override ModuleVisitor visitModule(final String name, final int flags, final String version); @Override AnnotationVisitor visitAnnotation(final String descriptor, final boolean visible); @Override AnnotationVisitor visitTypeAnnotation(
      final int typeRef, final TypePath typePath, final String descriptor, final boolean visible); @Override void visitAttribute(final Attribute attribute); @Override FieldVisitor visitField(
      final int access,
      final String name,
      final String descriptor,
      final String signature,
      final Object value); @Override MethodVisitor visitMethod(
      final int access,
      final String name,
      final String descriptor,
      final String signature,
      final String[] exceptions); @Override void visitInnerClass(
      final String name, final String outerName, final String innerName, final int access); @Override void visitOuterClass(final String owner, final String name, final String descriptor); @Override void visitNestHost(final String nestHost); @Override void visitNestMember(final String nestMember); }
ClassRemapper extends ClassVisitor { @Override public void visitInnerClass( final String name, final String outerName, final String innerName, final int access) { super.visitInnerClass( remapper.mapType(name), outerName == null ? null : remapper.mapType(outerName), innerName == null ? null : remapper.mapInnerClassName(name, outerName, innerName), access); } ClassRemapper(final ClassVisitor classVisitor, final Remapper remapper); protected  ClassRemapper(final int api, final ClassVisitor classVisitor, final Remapper remapper); @Override void visit(
      final int version,
      final int access,
      final String name,
      final String signature,
      final String superName,
      final String[] interfaces); @Override ModuleVisitor visitModule(final String name, final int flags, final String version); @Override AnnotationVisitor visitAnnotation(final String descriptor, final boolean visible); @Override AnnotationVisitor visitTypeAnnotation(
      final int typeRef, final TypePath typePath, final String descriptor, final boolean visible); @Override void visitAttribute(final Attribute attribute); @Override FieldVisitor visitField(
      final int access,
      final String name,
      final String descriptor,
      final String signature,
      final Object value); @Override MethodVisitor visitMethod(
      final int access,
      final String name,
      final String descriptor,
      final String signature,
      final String[] exceptions); @Override void visitInnerClass(
      final String name, final String outerName, final String innerName, final int access); @Override void visitOuterClass(final String owner, final String name, final String descriptor); @Override void visitNestHost(final String nestHost); @Override void visitNestMember(final String nestMember);  }