Package net.bytebuddy.dynamic.scaffold
Class TypeWriter.RecordComponentPool.Record.ForImplicitRecordComponent
- java.lang.Object
-
- net.bytebuddy.dynamic.scaffold.TypeWriter.RecordComponentPool.Record.ForImplicitRecordComponent
-
- All Implemented Interfaces:
TypeWriter.RecordComponentPool.Record
- Enclosing interface:
- TypeWriter.RecordComponentPool.Record
@Enhance public static class TypeWriter.RecordComponentPool.Record.ForImplicitRecordComponent extends java.lang.Object implements TypeWriter.RecordComponentPool.Record
A record for a simple field without a default value where all of the record component's declared annotations are appended.
-
-
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 RecordComponentDescription
recordComponentDescription
The implemented record component.
-
Constructor Summary
Constructors Constructor Description ForImplicitRecordComponent(RecordComponentDescription recordComponentDescription)
Creates a new record for a simple record component.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
apply(org.objectweb.asm.ClassVisitor classVisitor, AnnotationValueFilter.Factory annotationValueFilterFactory)
Writes this record to a given class visitor.void
apply(org.objectweb.asm.RecordComponentVisitor recordComponentVisitor, AnnotationValueFilter.Factory annotationValueFilterFactory)
Applies this record to a record component visitor.RecordComponentDescription
getRecordComponent()
Returns the record component that this record represents.RecordComponentAttributeAppender
getRecordComponentAppender()
Returns the record component attribute appender for a given record component.boolean
isImplicit()
Determines if this record is implicit, i.e is not defined by aTypeWriter.RecordComponentPool
.
-
-
-
Field Detail
-
recordComponentDescription
private final RecordComponentDescription recordComponentDescription
The implemented record component.
-
-
Constructor Detail
-
ForImplicitRecordComponent
public ForImplicitRecordComponent(RecordComponentDescription recordComponentDescription)
Creates a new record for a simple record component.- Parameters:
recordComponentDescription
- The described record component.
-
-
Method Detail
-
isImplicit
public boolean isImplicit()
Determines if this record is implicit, i.e is not defined by aTypeWriter.RecordComponentPool
.- Specified by:
isImplicit
in interfaceTypeWriter.RecordComponentPool.Record
- Returns:
true
if this record is implicit.
-
getRecordComponent
public RecordComponentDescription getRecordComponent()
Returns the record component that this record represents.- Specified by:
getRecordComponent
in 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:
getRecordComponentAppender
in 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:
apply
in 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:
apply
in 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.
-
-