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 java.lang.Object implements RecordComponentRegistry
An immutable default implementation of a record component registry.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
RecordComponentRegistry.Default.Compiled
A compiled default record component registry.protected static class
RecordComponentRegistry.Default.Entry
An entry of the default record component registry.-
Nested classes/interfaces inherited from interface net.bytebuddy.dynamic.scaffold.RecordComponentRegistry
RecordComponentRegistry.Default
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<RecordComponentRegistry.Default.Entry>
entries
This registries entries.
-
Constructor Summary
Constructors Modifier Constructor Description Default()
Creates a new empty default record component registry.private
Default(java.util.List<RecordComponentRegistry.Default.Entry> entries)
Creates a new default record component registry.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RecordComponentRegistry.Compiled
compile(TypeDescription instrumentedType)
Prepares the record component registry for a given instrumented type.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.
-
-
-
Field Detail
-
entries
private final java.util.List<RecordComponentRegistry.Default.Entry> entries
This registries entries.
-
-
Constructor Detail
-
Default
public Default()
Creates a new empty default record component registry.
-
Default
private Default(java.util.List<RecordComponentRegistry.Default.Entry> entries)
Creates a new default record component registry.- Parameters:
entries
- The entries of the record component registry.
-
-
Method Detail
-
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
public RecordComponentRegistry.Compiled compile(TypeDescription instrumentedType)
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.
-
-