Package net.bytebuddy.dynamic.scaffold
Class RecordComponentRegistry.Default
java.lang.Object
net.bytebuddy.dynamic.scaffold.RecordComponentRegistry.Default
- All Implemented Interfaces:
RecordComponentRegistry
- Enclosing interface:
RecordComponentRegistry
@Enhance
public static class RecordComponentRegistry.Default
extends Object
implements RecordComponentRegistry
An immutable default implementation of a record component registry.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static class
A compiled default record component registry.protected static class
An entry of the default record component registry.Nested classes/interfaces inherited from interface net.bytebuddy.dynamic.scaffold.RecordComponentRegistry
RecordComponentRegistry.Default
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final List
<RecordComponentRegistry.Default.Entry> This registries entries. -
Constructor Summary
ConstructorsModifierConstructorDescriptionDefault()
Creates a new empty default record component registry.private
Default
(List<RecordComponentRegistry.Default.Entry> entries) Creates a new default record component registry. -
Method Summary
Modifier and TypeMethodDescriptioncompile
(TypeDescription instrumentedType) Prepares the record component registry for a given instrumented type.prepend
(LatentMatcher<? super RecordComponentDescription> matcher, RecordComponentAttributeAppender.Factory recordComponentAttributeAppenderFactory, Transformer<RecordComponentDescription> transformer) Prepends the given record component definition to this record component registry, i.e.
-
Field Details
-
entries
This registries entries.
-
-
Constructor Details
-
Default
public Default()Creates a new empty default record component registry. -
Default
Creates a new default record component registry.- Parameters:
entries
- The entries of the record component registry.
-
-
Method Details
-
prepend
public RecordComponentRegistry prepend(LatentMatcher<? super RecordComponentDescription> matcher, RecordComponentAttributeAppender.Factory recordComponentAttributeAppenderFactory, Transformer<RecordComponentDescription> transformer) Prepends the given record component definition to this record component registry, i.e. this configuration is applied first.- Specified by:
prepend
in interfaceRecordComponentRegistry
- Parameters:
matcher
- The matcher to identify any record component that this definition concerns.recordComponentAttributeAppenderFactory
- The record component attribute appender factory to apply on any matched record component.transformer
- The record component transformer to apply to any matched record component.- Returns:
- An adapted version of this method registry.
-
compile
Prepares the record component registry for a given instrumented type.- Specified by:
compile
in interfaceRecordComponentRegistry
- Parameters:
instrumentedType
- The instrumented type.- Returns:
- A prepared record component registry.
-