Package net.bytebuddy.dynamic.scaffold
Class TypeWriter.RecordComponentPool.Record.ForExplicitRecordComponent
- java.lang.Object
-
- net.bytebuddy.dynamic.scaffold.TypeWriter.RecordComponentPool.Record.ForExplicitRecordComponent
-
- All Implemented Interfaces:
TypeWriter.RecordComponentPool.Record
- Enclosing interface:
- TypeWriter.RecordComponentPool.Record
@Enhance public static class TypeWriter.RecordComponentPool.Record.ForExplicitRecordComponent extends java.lang.Object implements TypeWriter.RecordComponentPool.Record
A record for a rich record component with attributes.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.bytebuddy.dynamic.scaffold.TypeWriter.RecordComponentPool.Record
TypeWriter.RecordComponentPool.Record.ForExplicitRecordComponent, TypeWriter.RecordComponentPool.Record.ForImplicitRecordComponent
-
-
Field Summary
Fields Modifier and Type Field Description private RecordComponentAttributeAppenderattributeAppenderThe attribute appender for the record component.private RecordComponentDescriptionrecordComponentDescriptionThe implemented record component.
-
Constructor Summary
Constructors Constructor Description ForExplicitRecordComponent(RecordComponentAttributeAppender attributeAppender, RecordComponentDescription recordComponentDescription)Creates a record for a rich record component.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidapply(org.objectweb.asm.ClassVisitor classVisitor, AnnotationValueFilter.Factory annotationValueFilterFactory)Writes this record to a given class visitor.voidapply(org.objectweb.asm.RecordComponentVisitor recordComponentVisitor, AnnotationValueFilter.Factory annotationValueFilterFactory)Applies this record to a record component visitor.RecordComponentDescriptiongetRecordComponent()Returns the record component that this record represents.RecordComponentAttributeAppendergetRecordComponentAppender()Returns the record component attribute appender for a given record component.booleanisImplicit()Determines if this record is implicit, i.e is not defined by aTypeWriter.RecordComponentPool.
-
-
-
Field Detail
-
attributeAppender
private final RecordComponentAttributeAppender attributeAppender
The attribute appender for the record component.
-
recordComponentDescription
private final RecordComponentDescription recordComponentDescription
The implemented record component.
-
-
Constructor Detail
-
ForExplicitRecordComponent
public ForExplicitRecordComponent(RecordComponentAttributeAppender attributeAppender, RecordComponentDescription recordComponentDescription)
Creates a record for a rich record component.- Parameters:
attributeAppender- The attribute appender for the record component.recordComponentDescription- The implemented record component.
-
-
Method Detail
-
isImplicit
public boolean isImplicit()
Determines if this record is implicit, i.e is not defined by aTypeWriter.RecordComponentPool.- Specified by:
isImplicitin interfaceTypeWriter.RecordComponentPool.Record- Returns:
trueif this record is implicit.
-
getRecordComponent
public RecordComponentDescription getRecordComponent()
Returns the record component that this record represents.- Specified by:
getRecordComponentin interfaceTypeWriter.RecordComponentPool.Record- Returns:
- The record component that this record represents.
-
getRecordComponentAppender
public RecordComponentAttributeAppender getRecordComponentAppender()
Returns the record component attribute appender for a given record component.- Specified by:
getRecordComponentAppenderin interfaceTypeWriter.RecordComponentPool.Record- Returns:
- The record component appender to be applied on the given field.
-
apply
public void apply(org.objectweb.asm.ClassVisitor classVisitor, AnnotationValueFilter.Factory annotationValueFilterFactory)Writes this record to a given class visitor.- Specified by:
applyin interfaceTypeWriter.RecordComponentPool.Record- Parameters:
classVisitor- The class visitor to which this record is to be written to.annotationValueFilterFactory- The annotation value filter factory to apply when writing annotations.
-
apply
public void apply(org.objectweb.asm.RecordComponentVisitor recordComponentVisitor, AnnotationValueFilter.Factory annotationValueFilterFactory)Applies this record to a record component visitor. This is not possible for implicit records.- Specified by:
applyin interfaceTypeWriter.RecordComponentPool.Record- Parameters:
recordComponentVisitor- The record component visitor onto which this record is to be applied.annotationValueFilterFactory- The annotation value filter factory to use for annotations.
-
-