public void visit( final int version, final int access, final String name, final String signature, final String superName, final String[] interfaces) { cv.visit(version, access, name, signature, superName, interfaces); }
cv.visit(version, access, name, signature, superName, interfaces);
/** * Defines the class header for the given class definition * * @param cw * @param classDef */ protected void buildClassHeader(ClassVisitor cw, ClassDefinition classDef) { String[] original = classDef.getInterfaces(); String[] interfaces = new String[original.length]; for ( int i = 0; i < original.length; i++ ) { interfaces[i] = BuildUtils.getInternalType( original[i] ); } int classModifiers = Opcodes.ACC_PUBLIC + Opcodes.ACC_SUPER; if ( classDef.isAbstrakt() ) { classModifiers += Opcodes.ACC_ABSTRACT; } // Building class header cw.visit( Opcodes.V1_5, classModifiers, BuildUtils.getInternalType( classDef.getClassName() ), null, BuildUtils.getInternalType( classDef.getSuperClass() ), interfaces ); buildClassAnnotations(classDef, cw); cw.visitSource( classDef.getClassName() + ".java", null ); }
classVisitor.visit(readInt(4), access, name,
classVisitor.visit( readInt(cpInfoOffsets[1] - 7), accessFlags, thisClass, signature, superClass, interfaces);
@Override public void visit(final int version, final int access, final String name, final String signature, final String superName, final String[] interfaces) { cv.visit(version, access, name, signature, superName, interfaces); this.name = name; }
classVisitor.visit(readInt(items[1] - 7), access, name, signature, superClass, interfaces);
/** * Visits the header of the class. * * @param version the class version. The minor version is stored in the 16 most significant bits, * and the major version in the 16 least significant bits. * @param access the class's access flags (see {@link Opcodes}). This parameter also indicates if * the class is deprecated. * @param name the internal name of the class (see {@link Type#getInternalName()}). * @param signature the signature of this class. May be {@literal null} if the class is not a * generic one, and does not extend or implement generic classes or interfaces. * @param superName the internal of name of the super class (see {@link Type#getInternalName()}). * For interfaces, the super class is {@link Object}. May be {@literal null}, but only for the * {@link Object} class. * @param interfaces the internal names of the class's interfaces (see {@link * Type#getInternalName()}). May be {@literal null}. */ public void visit( final int version, final int access, final String name, final String signature, final String superName, final String[] interfaces) { if (cv != null) { cv.visit(version, access, name, signature, superName, interfaces); } }
@Override public void visit(final int version, final int access, final String name, final String signature, final String superName, final String[] interfaces) { computeSVUID = (access & Opcodes.ACC_ENUM) == 0; if (computeSVUID) { this.name = name; this.access = access; this.interfaces = new String[interfaces.length]; System.arraycopy(interfaces, 0, this.interfaces, 0, interfaces.length); } super.visit(version, access, name, signature, superName, interfaces); }
String superName, String[] interfaces) { if (cv != null) { cv.visit(version, access, name, signature, superName, interfaces);
@Override public void visit(final int version, final int access, final String name, final String signature, final String superName, final String[] interfaces) { p.visit(version, access, name, signature, superName, interfaces); super.visit(version, access, name, signature, superName, interfaces); }
@Override public final void end(final String element) { HashMap<?, ?> vals = (HashMap<?, ?>) pop(); int version = ((Integer) vals.get("version")).intValue(); int access = getAccess((String) vals.get("access")); String name = (String) vals.get("name"); String signature = (String) vals.get("signature"); String parent = (String) vals.get("parent"); ArrayList<?> infs = (ArrayList<?>) vals.get("interfaces"); String[] interfaces = infs.toArray(new String[infs.size()]); cv.visit(version, access, name, signature, parent, interfaces); push(cv); } }
cv.visit(version, access, name, signature, superName, interfaces);
@Override public void visit(int version, int access, String name, String signature, String superName, String[] interfaces) { this.className = name; super.visit(version, access, remapper.mapType(name), remapper .mapSignature(signature, false), remapper.mapType(superName), interfaces == null ? null : remapper.mapTypes(interfaces)); }
super.visit(version, access, name, signature, superName, interfaces);
@Override public void visit(int version, int access, String name, String signature, String superName, String[] interfaces) { this.className = name; super.visit(version, access, remapper.mapType(name), remapper .mapSignature(signature, false), remapper.mapType(superName), interfaces == null ? null : remapper.mapTypes(interfaces)); }