< prev index next >

src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/TraceClassVisitor.java

Print this page

        

*** 72,109 **** * A {@link ClassVisitor} that prints the classes it visits with a * {@link Printer}. This class visitor can be used in the middle of a class * visitor chain to trace the class that is visited at a given point in this * chain. This may be useful for debugging purposes. * <p> ! * The trace printed when visiting the {@code Hello} class is the following: * <blockquote> * ! * <pre>{@code * // class version 49.0 (49) // access flags 0x21 public class Hello { * * // compiled from: Hello.java * ! * // access flags 0x1 public <init> ()V ALOAD 0 INVOKESPECIAL ! * java/lang/Object <init> ()V RETURN MAXSTACK = 1 MAXLOCALS = 1 * * // access flags 0x9 public static main ([Ljava/lang/String;)V GETSTATIC ! * java/lang/System out Ljava/io/PrintStream; LDC "hello" * INVOKEVIRTUAL java/io/PrintStream println (Ljava/lang/String;)V RETURN * MAXSTACK = 2 MAXLOCALS = 1 } ! * }</pre> * ! * </blockquote> where {@code Hello} is defined by: * <blockquote> * ! * <pre>{@code * public class Hello { * * public static void main(String[] args) { ! * System.out.println("hello"); * } * } ! * }</pre> * * </blockquote> * * @author Eric Bruneton * @author Eugene Kuleshov --- 72,111 ---- * A {@link ClassVisitor} that prints the classes it visits with a * {@link Printer}. This class visitor can be used in the middle of a class * visitor chain to trace the class that is visited at a given point in this * chain. This may be useful for debugging purposes. * <p> ! * The trace printed when visiting the <tt>Hello</tt> class is the following: ! * <p> * <blockquote> * ! * <pre> * // class version 49.0 (49) // access flags 0x21 public class Hello { * * // compiled from: Hello.java * ! * // access flags 0x1 public &lt;init&gt; ()V ALOAD 0 INVOKESPECIAL ! * java/lang/Object &lt;init&gt; ()V RETURN MAXSTACK = 1 MAXLOCALS = 1 * * // access flags 0x9 public static main ([Ljava/lang/String;)V GETSTATIC ! * java/lang/System out Ljava/io/PrintStream; LDC &quot;hello&quot; * INVOKEVIRTUAL java/io/PrintStream println (Ljava/lang/String;)V RETURN * MAXSTACK = 2 MAXLOCALS = 1 } ! * </pre> * ! * </blockquote> where <tt>Hello</tt> is defined by: ! * <p> * <blockquote> * ! * <pre> * public class Hello { * * public static void main(String[] args) { ! * System.out.println(&quot;hello&quot;); * } * } ! * </pre> * * </blockquote> * * @author Eric Bruneton * @author Eugene Kuleshov
*** 133,143 **** /** * Constructs a new {@link TraceClassVisitor}. * * @param cv * the {@link ClassVisitor} to which this visitor delegates ! * calls. May be {@code null}. * @param pw * the print writer to be used to print the class. */ public TraceClassVisitor(final ClassVisitor cv, final PrintWriter pw) { this(cv, new Textifier(), pw); --- 135,145 ---- /** * Constructs a new {@link TraceClassVisitor}. * * @param cv * the {@link ClassVisitor} to which this visitor delegates ! * calls. May be <tt>null</tt>. * @param pw * the print writer to be used to print the class. */ public TraceClassVisitor(final ClassVisitor cv, final PrintWriter pw) { this(cv, new Textifier(), pw);
*** 146,156 **** /** * Constructs a new {@link TraceClassVisitor}. * * @param cv * the {@link ClassVisitor} to which this visitor delegates ! * calls. May be {@code null}. * @param p * the object that actually converts visit events into text. * @param pw * the print writer to be used to print the class. May be null if * you simply want to use the result via --- 148,158 ---- /** * Constructs a new {@link TraceClassVisitor}. * * @param cv * the {@link ClassVisitor} to which this visitor delegates ! * calls. May be <tt>null</tt>. * @param p * the object that actually converts visit events into text. * @param pw * the print writer to be used to print the class. May be null if * you simply want to use the result via
< prev index next >