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

public Class CheckRecordComponentAdapter

extends RecordComponentVisitor
Class Inheritance
Imports
org.objectweb.asm.AnnotationVisitor, .Attribute, .Opcodes, .RecordComponentVisitor, .TypePath, .TypeReference

A RecordComponentVisitor that checks that its methods are properly used.
Authors
Eric Bruneton, Remi Forax

Field Summary

Modifier and TypeField and Description
private boolean
visitEndCalled

Whether the visitEnd() method has been called.

Inherited from org.objectweb.asm.RecordComponentVisitor:
apidelegate

Constructor Summary

AccessConstructor and Description
public
CheckRecordComponentAdapter(final RecordComponentVisitor
the record component visitor to which this adapter must delegate calls.
recordComponentVisitor
)

Constructs a new CheckRecordComponentAdapter.

protected
CheckRecordComponentAdapter(final int
the ASM API version implemented by this visitor. Must be one of Opcodes#ASM8 or Opcodes#ASM9.
api
,
final RecordComponentVisitor
the record component visitor to which this adapter must delegate calls.
recordComponentVisitor
)

Constructs a new CheckRecordComponentAdapter.

Method Summary

Modifier and TypeMethod and Description
private void
public AnnotationVisitor
visitAnnotation(final String
the class descriptor of the annotation class.
descriptor
,
final boolean
true if the annotation is visible at runtime.
visible
)

Overrides org.objectweb.asm.RecordComponentVisitor.visitAnnotation.

Visits an annotation of the record component.
public void
visitAttribute(final Attribute
an attribute.
attribute
)

Overrides org.objectweb.asm.RecordComponentVisitor.visitAttribute.

Visits a non standard attribute of the record component.
public void
visitEnd()

Overrides org.objectweb.asm.RecordComponentVisitor.visitEnd.

Visits the end of the record component.
public AnnotationVisitor
visitTypeAnnotation(final int
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.
typeRef
,
final 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.
typePath
,
final String
the class descriptor of the annotation class.
descriptor
,
final boolean
true if the annotation is visible at runtime.
visible
)

Overrides org.objectweb.asm.RecordComponentVisitor.visitTypeAnnotation.

Visits an annotation on a type in the record component signature.
Inherited from org.objectweb.asm.RecordComponentVisitor:
getDelegate

Field Detail

visitEndCalledback to summary
private boolean visitEndCalled

Whether the visitEnd() method has been called.

Constructor Detail

CheckRecordComponentAdapterback to summary
public CheckRecordComponentAdapter(final RecordComponentVisitor recordComponentVisitor)

Constructs a new CheckRecordComponentAdapter. Subclasses must not use this constructor. Instead, they must use the CheckRecordComponentAdapter(int, RecordComponentVisitor) version.

Parameters
recordComponentVisitor:RecordComponentVisitor

the record component visitor to which this adapter must delegate calls.

Exceptions
IllegalStateException:
If a subclass calls this constructor.
CheckRecordComponentAdapterback to summary
protected CheckRecordComponentAdapter(final int api, final RecordComponentVisitor recordComponentVisitor)

Constructs a new CheckRecordComponentAdapter.

Parameters
api:int

the ASM API version implemented by this visitor. Must be one of Opcodes#ASM8 or Opcodes#ASM9.

recordComponentVisitor:RecordComponentVisitor

the record component visitor to which this adapter must delegate calls.

Method Detail

checkVisitEndNotCalledback to summary
private void checkVisitEndNotCalled()
visitAnnotationback to summary
public AnnotationVisitor visitAnnotation(final String descriptor, final boolean visible)

Overrides org.objectweb.asm.RecordComponentVisitor.visitAnnotation.

Doc from org.objectweb.asm.RecordComponentVisitor.visitAnnotation.

Visits an annotation of the record component.

Parameters
descriptor:String

the class descriptor of the annotation class.

visible:boolean

true if the annotation is visible at runtime.

Returns:AnnotationVisitor

a visitor to visit the annotation values, or null if this visitor is not interested in visiting this annotation.

Annotations
@Override
visitAttributeback to summary
public void visitAttribute(final Attribute attribute)

Overrides org.objectweb.asm.RecordComponentVisitor.visitAttribute.

Doc from org.objectweb.asm.RecordComponentVisitor.visitAttribute.

Visits a non standard attribute of the record component.

Parameters
attribute:Attribute

an attribute.

Annotations
@Override
visitEndback to summary
public void visitEnd()

Overrides org.objectweb.asm.RecordComponentVisitor.visitEnd.

Doc from org.objectweb.asm.RecordComponentVisitor.visitEnd.

Visits the end of the record component. This method, which is the last one to be called, is used to inform the visitor that everything have been visited.

Annotations
@Override
visitTypeAnnotationback to summary
public AnnotationVisitor visitTypeAnnotation(final int typeRef, final TypePath typePath, final String descriptor, final boolean visible)

Overrides org.objectweb.asm.RecordComponentVisitor.visitTypeAnnotation.

Doc from org.objectweb.asm.RecordComponentVisitor.visitTypeAnnotation.

Visits an annotation on a type in the record component signature.

Parameters
typeRef:int

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: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:String

the class descriptor of the annotation class.

visible:boolean

true if the annotation is visible at runtime.

Returns:AnnotationVisitor

a visitor to visit the annotation values, or null if this visitor is not interested in visiting this annotation.

Annotations
@Override