Top Description Fields Constructors Methods
org.objectweb.asm.util

public final Class TraceAnnotationVisitor

extends AnnotationVisitor
Class Inheritance
Imports
org.objectweb.asm.AnnotationVisitor, .Opcodes

An AnnotationVisitor that prints the annotations it visits with a Printer.
Author
Eric Bruneton

Field Summary

Modifier and TypeField and Description
private final Printer
printer

The printer to convert the visited annotation into text.

Inherited from org.objectweb.asm.AnnotationVisitor:
apiav

Constructor Summary

AccessConstructor and Description
public
TraceAnnotationVisitor(final Printer
the printer to convert the visited annotation into text.
printer
)

Constructs a new TraceAnnotationVisitor.

public
TraceAnnotationVisitor(final AnnotationVisitor
the annotation visitor to which to delegate calls. May be null.
annotationVisitor
,
final Printer
the printer to convert the visited annotation into text.
printer
)

Constructs a new TraceAnnotationVisitor.

Method Summary

Modifier and TypeMethod and Description
public void
visit(final String
the value name.
name
,
final Object
the actual value, whose type must be Byte, Boolean, Character, Short, Integer , Long, Float, Double, String or Type of Type#OBJECT or Type#ARRAY sort. This value can also be an array of byte, boolean, short, char, int, long, float or double values (this is equivalent to using visitArray and visiting each array element in turn, but is more convenient).
value
)

Overrides org.objectweb.asm.AnnotationVisitor.visit.

Visits a primitive value of the annotation.
public AnnotationVisitor
visitAnnotation(final String
the value name.
name
,
final String
the class descriptor of the nested annotation class.
descriptor
)

Overrides org.objectweb.asm.AnnotationVisitor.visitAnnotation.

Visits a nested annotation value of the annotation.
public AnnotationVisitor
visitArray(final String
the value name.
name
)

Overrides org.objectweb.asm.AnnotationVisitor.visitArray.

Visits an array value of the annotation.
public void
visitEnd()

Overrides org.objectweb.asm.AnnotationVisitor.visitEnd.

Visits the end of the annotation.
public void
visitEnum(final String
the value name.
name
,
final String
the class descriptor of the enumeration class.
descriptor
,
final String
the actual enumeration value.
value
)

Overrides org.objectweb.asm.AnnotationVisitor.visitEnum.

Visits an enumeration value of the annotation.
Inherited from org.objectweb.asm.AnnotationVisitor:
getDelegate

Field Detail

printerback to summary
private final Printer printer

The printer to convert the visited annotation into text.

Constructor Detail

TraceAnnotationVisitorback to summary
public TraceAnnotationVisitor(final Printer printer)

Constructs a new TraceAnnotationVisitor.

Parameters
printer:Printer

the printer to convert the visited annotation into text.

TraceAnnotationVisitorback to summary
public TraceAnnotationVisitor(final AnnotationVisitor annotationVisitor, final Printer printer)

Constructs a new TraceAnnotationVisitor.

Parameters
annotationVisitor:AnnotationVisitor

the annotation visitor to which to delegate calls. May be null.

printer:Printer

the printer to convert the visited annotation into text.

Method Detail

visitback to summary
public void visit(final String name, final Object value)

Overrides org.objectweb.asm.AnnotationVisitor.visit.

Doc from org.objectweb.asm.AnnotationVisitor.visit.

Visits a primitive value of the annotation.

Parameters
name:String

the value name.

value:Object

the actual value, whose type must be Byte, Boolean, Character, Short, Integer , Long, Float, Double, String or Type of Type#OBJECT or Type#ARRAY sort. This value can also be an array of byte, boolean, short, char, int, long, float or double values (this is equivalent to using visitArray and visiting each array element in turn, but is more convenient).

Annotations
@Override
visitAnnotationback to summary
public AnnotationVisitor visitAnnotation(final String name, final String descriptor)

Overrides org.objectweb.asm.AnnotationVisitor.visitAnnotation.

Doc from org.objectweb.asm.AnnotationVisitor.visitAnnotation.

Visits a nested annotation value of the annotation.

Parameters
name:String

the value name.

descriptor:String

the class descriptor of the nested annotation class.

Returns:AnnotationVisitor

a visitor to visit the actual nested annotation value, or null if this visitor is not interested in visiting this nested annotation. The nested annotation value must be fully visited before calling other methods on this annotation visitor.

Annotations
@Override
visitArrayback to summary
public AnnotationVisitor visitArray(final String name)

Overrides org.objectweb.asm.AnnotationVisitor.visitArray.

Doc from org.objectweb.asm.AnnotationVisitor.visitArray.

Visits an array value of the annotation. Note that arrays of primitive values (such as byte, boolean, short, char, int, long, float or double) can be passed as value to visit. This is what ClassReader does for non empty arrays of primitive values.

Parameters
name:String

the value name.

Returns:AnnotationVisitor

a visitor to visit the actual array value elements, or null if this visitor is not interested in visiting these values. The 'name' parameters passed to the methods of this visitor are ignored. All the array values must be visited before calling other methods on this annotation visitor.

Annotations
@Override
visitEndback to summary
public void visitEnd()

Overrides org.objectweb.asm.AnnotationVisitor.visitEnd.

Doc from org.objectweb.asm.AnnotationVisitor.visitEnd.

Visits the end of the annotation.

Annotations
@Override
visitEnumback to summary
public void visitEnum(final String name, final String descriptor, final String value)

Overrides org.objectweb.asm.AnnotationVisitor.visitEnum.

Doc from org.objectweb.asm.AnnotationVisitor.visitEnum.

Visits an enumeration value of the annotation.

Parameters
name:String

the value name.

descriptor:String

the class descriptor of the enumeration class.

value:String

the actual enumeration value.

Annotations
@Override