classVisitor.visit(readInt(items[1] - 7), access, name, signature, superClass, interfaces); classVisitor.visitSource(sourceFile, sourceDebug); classVisitor.visitOuterClass(enclosingOwner, enclosingName, enclosingDesc); for (int i = readUnsignedShort(anns), v = anns + 2; i > 0; --i) { v = readAnnotationValues(v + 2, c, true, classVisitor.visitAnnotation(readUTF8(v, c), true)); for (int i = readUnsignedShort(ianns), v = ianns + 2; i > 0; --i) { v = readAnnotationValues(v + 2, c, true, classVisitor.visitAnnotation(readUTF8(v, c), false)); v = readAnnotationTarget(context, v); v = readAnnotationValues(v + 2, c, true, classVisitor.visitTypeAnnotation(context.typeRef, context.typePath, readUTF8(v, c), true)); v = readAnnotationTarget(context, v); v = readAnnotationValues(v + 2, c, true, classVisitor.visitTypeAnnotation(context.typeRef, context.typePath, readUTF8(v, c), false)); Attribute attr = attributes.next; attributes.next = null; classVisitor.visitAttribute(attributes);
String signature, Object value) { if (cv != null) { return cv.visitField(access, name, desc, signature, value);
String signature, String[] exceptions) { if (cv != null) { return cv.visitMethod(access, name, desc, signature, exceptions);
/** * Visits a non standard attribute of the class. * * @param attr * an attribute. */ public void visitAttribute(Attribute attr) { if (cv != null) { cv.visitAttribute(attr); } }
/** * Visits the end of the class. This method, which is the last one to be * called, is used to inform the visitor that all the fields and methods of * the class have been visited. */ public void visitEnd() { if (cv != null) { cv.visitEnd(); } } }
/** * Visits the source of the class. * * @param source * the name of the source file from which the class was compiled. * May be <tt>null</tt>. * @param debug * additional debug information to compute the correspondance * between source and compiled elements of the class. May be * <tt>null</tt>. */ public void visitSource(String source, String debug) { if (cv != null) { cv.visitSource(source, debug); } }
/** * Visits an annotation of the class. * * @param desc * the class descriptor of the annotation class. * @param visible * <tt>true</tt> if the annotation is visible at runtime. * @return a visitor to visit the annotation values, or <tt>null</tt> if * this visitor is not interested in visiting this annotation. */ public AnnotationVisitor visitAnnotation(String desc, boolean visible) { if (cv != null) { return cv.visitAnnotation(desc, visible); } return null; }
/** * Visits the enclosing class of the class. This method must be called only * if the class has an enclosing class. * * @param owner * internal name of the enclosing class of the class. * @param name * the name of the method that contains the class, or * <tt>null</tt> if the class is not enclosed in a method of its * enclosing class. * @param desc * the descriptor of the method that contains the class, or * <tt>null</tt> if the class is not enclosed in a method of its * enclosing class. */ public void visitOuterClass(String owner, String name, String desc) { if (cv != null) { cv.visitOuterClass(owner, name, desc); } }
/** * Visits information about an inner class. This inner class is not * necessarily a member of the class being visited. * * @param name * the internal name of an inner class (see * {@link Type#getInternalName() getInternalName}). * @param outerName * the internal name of the class to which the inner class * belongs (see {@link Type#getInternalName() getInternalName}). * May be <tt>null</tt> for not member classes. * @param innerName * the (simple) name of the inner class inside its enclosing * class. May be <tt>null</tt> for anonymous inner classes. * @param access * the access flags of the inner class as originally declared in * the enclosing class. */ public void visitInnerClass(String name, String outerName, String innerName, int access) { if (cv != null) { cv.visitInnerClass(name, outerName, innerName, access); } }
return cv.visitTypeAnnotation(typeRef, typePath, desc, visible);
String superName, String[] interfaces) { if (cv != null) { cv.visit(version, access, name, signature, superName, interfaces);
/** * Visits a non standard attribute of the class. * * @param attr * an attribute. */ public void visitAttribute(Attribute attr) { if (cv != null) { cv.visitAttribute(attr); } }
/** * Visits the end of the class. This method, which is the last one to be * called, is used to inform the visitor that all the fields and methods of * the class have been visited. */ public void visitEnd() { if (cv != null) { cv.visitEnd(); } } }
/** * Visits the source of the class. * * @param source * the name of the source file from which the class was compiled. * May be <tt>null</tt>. * @param debug * additional debug information to compute the correspondance * between source and compiled elements of the class. May be * <tt>null</tt>. */ public void visitSource(String source, String debug) { if (cv != null) { cv.visitSource(source, debug); } }
/** * Visits an annotation of the class. * * @param desc * the class descriptor of the annotation class. * @param visible * <tt>true</tt> if the annotation is visible at runtime. * @return a visitor to visit the annotation values, or <tt>null</tt> if * this visitor is not interested in visiting this annotation. */ public AnnotationVisitor visitAnnotation(String desc, boolean visible) { if (cv != null) { return cv.visitAnnotation(desc, visible); } return null; }
/** * Visits the enclosing class of the class. This method must be called only * if the class has an enclosing class. * * @param owner * internal name of the enclosing class of the class. * @param name * the name of the method that contains the class, or * <tt>null</tt> if the class is not enclosed in a method of its * enclosing class. * @param desc * the descriptor of the method that contains the class, or * <tt>null</tt> if the class is not enclosed in a method of its * enclosing class. */ public void visitOuterClass(String owner, String name, String desc) { if (cv != null) { cv.visitOuterClass(owner, name, desc); } }
/** * Visits information about an inner class. This inner class is not * necessarily a member of the class being visited. * * @param name * the internal name of an inner class (see * {@link Type#getInternalName() getInternalName}). * @param outerName * the internal name of the class to which the inner class * belongs (see {@link Type#getInternalName() getInternalName}). * May be <tt>null</tt> for not member classes. * @param innerName * the (simple) name of the inner class inside its enclosing * class. May be <tt>null</tt> for anonymous inner classes. * @param access * the access flags of the inner class as originally declared in * the enclosing class. */ public void visitInnerClass(String name, String outerName, String innerName, int access) { if (cv != null) { cv.visitInnerClass(name, outerName, innerName, access); } }
return cv.visitTypeAnnotation(typeRef, typePath, desc, visible);
String superName, String[] interfaces) { if (cv != null) { cv.visit(version, access, name, signature, superName, interfaces);
classVisitor.visit(readInt(items[1] - 7), access, name, signature, superClass, interfaces); classVisitor.visitSource(sourceFile, sourceDebug); classVisitor.visitOuterClass(enclosingOwner, enclosingName, enclosingDesc); for (int i = readUnsignedShort(anns), v = anns + 2; i > 0; --i) { v = readAnnotationValues(v + 2, c, true, classVisitor.visitAnnotation(readUTF8(v, c), true)); for (int i = readUnsignedShort(ianns), v = ianns + 2; i > 0; --i) { v = readAnnotationValues(v + 2, c, true, classVisitor.visitAnnotation(readUTF8(v, c), false)); v = readAnnotationTarget(context, v); v = readAnnotationValues(v + 2, c, true, classVisitor.visitTypeAnnotation(context.typeRef, context.typePath, readUTF8(v, c), true)); v = readAnnotationTarget(context, v); v = readAnnotationValues(v + 2, c, true, classVisitor.visitTypeAnnotation(context.typeRef, context.typePath, readUTF8(v, c), false)); Attribute attr = attributes.next; attributes.next = null; classVisitor.visitAttribute(attributes);