Top Fields Constructors Methods
org.objectweb.asm

pack-priv final Class RecordComponentWriter

extends RecordComponentVisitor
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final int
descriptorIndex

The descriptor_index field of the Record attribute.

private Attribute
firstAttribute

The first non standard attribute of this record component.

private AnnotationWriter
lastRuntimeInvisibleAnnotation

The last runtime invisible annotation of this record component.

private AnnotationWriter
lastRuntimeInvisibleTypeAnnotation

The last runtime invisible type annotation of this record component.

private AnnotationWriter
lastRuntimeVisibleAnnotation

The last runtime visible annotation of this record component.

private AnnotationWriter
lastRuntimeVisibleTypeAnnotation

The last runtime visible type annotation of this record component.

private final int
nameIndex

The name_index field of the Record attribute.

private int
signatureIndex

The signature_index field of the Signature attribute of this record component, or 0 if there is no Signature attribute.

private final SymbolTable
symbolTable

Where the constants used in this RecordComponentWriter must be stored.

Inherited from org.objectweb.asm.RecordComponentVisitor:
apidelegate

Constructor Summary

AccessConstructor and Description
pack-priv
RecordComponentWriter(final SymbolTable
where the constants used in this RecordComponentWriter must be stored.
symbolTable
,
final String
the record component name.
name
,
final String
the record component descriptor (see Type).
descriptor
,
final String
the record component signature. May be null.
signature
)

Constructs a new RecordComponentWriter.

Method Summary

Modifier and TypeMethod and Description
pack-priv final void
collectAttributePrototypes(final Attribute.Set
a set of attribute prototypes.
attributePrototypes
)

Collects the attributes of this record component into the given set of attribute prototypes.

pack-priv int

Returns:

the size in bytes of the record_component_info of the Record attribute.
computeRecordComponentInfoSize
()

Returns the size of the record component JVMS structure generated by this RecordComponentWriter.

pack-priv void
putRecordComponentInfo(final ByteVector
where the record_component_info structure must be put.
output
)

Puts the content of the record component generated by this RecordComponentWriter into the given ByteVector.

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

descriptorIndexback to summary
private final int descriptorIndex

The descriptor_index field of the Record attribute.

firstAttributeback to summary
private Attribute firstAttribute

The first non standard attribute of this record component. The next ones can be accessed with the Attribute#nextAttribute field. May be null.

Warning

this list stores the attributes in the reverse order of their visit. firstAttribute is actually the last attribute visited in visitAttribute(Attribute). The putRecordComponentInfo(ByteVector) method writes the attributes in the order defined by this list, i.e. in the reverse order specified by the user.

lastRuntimeInvisibleAnnotationback to summary
private AnnotationWriter lastRuntimeInvisibleAnnotation

The last runtime invisible annotation of this record component. The previous ones can be accessed with the AnnotationWriter#previousAnnotation field. May be null.

lastRuntimeInvisibleTypeAnnotationback to summary
private AnnotationWriter lastRuntimeInvisibleTypeAnnotation

The last runtime invisible type annotation of this record component. The previous ones can be accessed with the AnnotationWriter#previousAnnotation field. May be null.

lastRuntimeVisibleAnnotationback to summary
private AnnotationWriter lastRuntimeVisibleAnnotation

The last runtime visible annotation of this record component. The previous ones can be accessed with the AnnotationWriter#previousAnnotation field. May be null.

lastRuntimeVisibleTypeAnnotationback to summary
private AnnotationWriter lastRuntimeVisibleTypeAnnotation

The last runtime visible type annotation of this record component. The previous ones can be accessed with the AnnotationWriter#previousAnnotation field. May be null.

nameIndexback to summary
private final int nameIndex

The name_index field of the Record attribute.

signatureIndexback to summary
private int signatureIndex

The signature_index field of the Signature attribute of this record component, or 0 if there is no Signature attribute.

symbolTableback to summary
private final SymbolTable symbolTable

Where the constants used in this RecordComponentWriter must be stored.

Constructor Detail

RecordComponentWriterback to summary
pack-priv RecordComponentWriter(final SymbolTable symbolTable, final String name, final String descriptor, final String signature)

Constructs a new RecordComponentWriter.

Parameters
symbolTable:SymbolTable

where the constants used in this RecordComponentWriter must be stored.

name:String

the record component name.

descriptor:String

the record component descriptor (see Type).

signature:String

the record component signature. May be null.

Method Detail

collectAttributePrototypesback to summary
pack-priv final void collectAttributePrototypes(final Attribute.Set attributePrototypes)

Collects the attributes of this record component into the given set of attribute prototypes.

Parameters
attributePrototypes:Attribute.Set

a set of attribute prototypes.

computeRecordComponentInfoSizeback to summary
pack-priv int computeRecordComponentInfoSize()

Returns the size of the record component JVMS structure generated by this RecordComponentWriter. Also adds the names of the attributes of this record component in the constant pool.

Returns:int

the size in bytes of the record_component_info of the Record attribute.

putRecordComponentInfoback to summary
pack-priv void putRecordComponentInfo(final ByteVector output)

Puts the content of the record component generated by this RecordComponentWriter into the given ByteVector.

Parameters
output:ByteVector

where the record_component_info structure must be put.

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