Package net.bytebuddy.dynamic.scaffold
Interface TypeWriter.RecordComponentPool.Record
- All Known Implementing Classes:
TypeWriter.RecordComponentPool.Record.ForExplicitRecordComponent
,TypeWriter.RecordComponentPool.Record.ForImplicitRecordComponent
- Enclosing interface:
TypeWriter.RecordComponentPool
public static interface TypeWriter.RecordComponentPool.Record
An entry of a record component pool that describes how a record component is implemented.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic class
A record for a rich record component with attributes.static class
A record for a simple field without a default value where all of the record component's declared annotations are appended. -
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
.
-
Method Details
-
isImplicit
boolean isImplicit()Determines if this record is implicit, i.e is not defined by aTypeWriter.RecordComponentPool
.- Returns:
true
if this record is implicit.
-
getRecordComponent
RecordComponentDescription getRecordComponent()Returns the record component that this record represents.- Returns:
- The record component that this record represents.
-
getRecordComponentAppender
RecordComponentAttributeAppender getRecordComponentAppender()Returns the record component attribute appender for a given record component.- Returns:
- The record component appender to be applied on the given field.
-
apply
void apply(org.objectweb.asm.ClassVisitor classVisitor, AnnotationValueFilter.Factory annotationValueFilterFactory) Writes this record to a given class visitor.- 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
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.- Parameters:
recordComponentVisitor
- The record component visitor onto which this record is to be applied.annotationValueFilterFactory
- The annotation value filter factory to use for annotations.
-