public final class TraceRecordComponentVisitor extends RecordComponentVisitor
RecordComponentVisitor
that prints the record components it visits with a Printer
.Modifier and Type | Field and Description |
---|---|
Printer |
printer
The printer to convert the visited record component into text.
|
api
Constructor and Description |
---|
TraceRecordComponentVisitor(Printer printer)
Constructs a new
TraceRecordComponentVisitor . |
TraceRecordComponentVisitor(RecordComponentVisitor recordComponentVisitor,
Printer printer)
Constructs a new
TraceRecordComponentVisitor . |
Modifier and Type | Method and Description |
---|---|
AnnotationVisitor |
visitAnnotation(String descriptor,
boolean visible)
Visits an annotation of the record component.
|
void |
visitAttribute(Attribute attribute)
Visits a non standard attribute of the record component.
|
void |
visitEnd()
Visits the end of the record component.
|
AnnotationVisitor |
visitTypeAnnotation(int typeRef,
TypePath typePath,
String descriptor,
boolean visible)
Visits an annotation on a type in the record component signature.
|
getDelegate
public final Printer printer
public TraceRecordComponentVisitor(Printer printer)
TraceRecordComponentVisitor
.printer
- the printer to convert the visited record component into text.public TraceRecordComponentVisitor(RecordComponentVisitor recordComponentVisitor, Printer printer)
TraceRecordComponentVisitor
.recordComponentVisitor
- the record component visitor to which to delegate calls. May be
null.printer
- the printer to convert the visited record component into text.public AnnotationVisitor visitAnnotation(String descriptor, boolean visible)
RecordComponentVisitor
visitAnnotation
in class RecordComponentVisitor
descriptor
- the class descriptor of the annotation class.visible
- true if the annotation is visible at runtime.public AnnotationVisitor visitTypeAnnotation(int typeRef, TypePath typePath, String descriptor, boolean visible)
RecordComponentVisitor
visitTypeAnnotation
in class RecordComponentVisitor
typeRef
- a reference to the annotated type. The sort of this type reference must be
TypeReference.CLASS_TYPE_PARAMETER
, TypeReference.CLASS_TYPE_PARAMETER_BOUND
or TypeReference.CLASS_EXTENDS
. See
TypeReference
.typePath
- the path to the annotated type argument, wildcard bound, array element type, or
static inner type within 'typeRef'. May be null if the annotation targets
'typeRef' as a whole.descriptor
- the class descriptor of the annotation class.visible
- true if the annotation is visible at runtime.public void visitAttribute(Attribute attribute)
RecordComponentVisitor
visitAttribute
in class RecordComponentVisitor
attribute
- an attribute.public void visitEnd()
RecordComponentVisitor
visitEnd
in class RecordComponentVisitor
Copyright © 2024. All rights reserved.