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 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
FieldsModifier and TypeFieldDescriptionprivate final RecordComponentDescription
The implemented record component. -
Constructor Summary
ConstructorsConstructorDescriptionForImplicitRecordComponent
(RecordComponentDescription recordComponentDescription) Creates a new record for a simple record component. -
Method Summary
Modifier and TypeMethodDescriptionvoid
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.Returns the record component that this record represents.Returns the record component attribute appender for a given record component.boolean
Determines if this record is implicit, i.e is not defined by aTypeWriter.RecordComponentPool
.
-
Field Details
-
recordComponentDescription
The implemented record component.
-
-
Constructor Details
-
ForImplicitRecordComponent
Creates a new record for a simple record component.- Parameters:
recordComponentDescription
- The described record component.
-
-
Method Details
-
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
Returns the record component that this record represents.- Specified by:
getRecordComponent
in interfaceTypeWriter.RecordComponentPool.Record
- Returns:
- The record component that this record represents.
-
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.
-