public class CheckRecordComponentAdapter extends RecordComponentVisitor
RecordComponentVisitor
that checks that its methods are properly used.api
Modifier | Constructor and Description |
---|---|
protected |
CheckRecordComponentAdapter(int api,
RecordComponentVisitor recordComponentVisitor)
Constructs a new
CheckRecordComponentAdapter . |
|
CheckRecordComponentAdapter(RecordComponentVisitor recordComponentVisitor)
Constructs a new
CheckRecordComponentAdapter . |
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 CheckRecordComponentAdapter(RecordComponentVisitor recordComponentVisitor)
CheckRecordComponentAdapter
. Subclasses must not use this
constructor. Instead, they must use the CheckRecordComponentAdapter(int,
RecordComponentVisitor)
version.recordComponentVisitor
- the record component visitor to which this adapter must delegate
calls.IllegalStateException
- If a subclass calls this constructor.protected CheckRecordComponentAdapter(int api, RecordComponentVisitor recordComponentVisitor)
CheckRecordComponentAdapter
.api
- the ASM API version implemented by this visitor. Must be Opcodes.ASM8
.recordComponentVisitor
- the record component visitor to which this adapter must delegate
calls.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 © 2023. All rights reserved.