Package net.bytebuddy.dynamic.scaffold
Interface RecordComponentRegistry
-
- All Known Implementing Classes:
RecordComponentRegistry.Default
public interface RecordComponentRegistry
A record component registry represents an extendable collection of record components which are identified by their names that are mapped to a givenRecordComponentAttributeAppender
. Record components can be uniquely identified by their name for a given type since record components are never inherited.MethodRegistry
. However, a record component registry is implemented simpler since it does not have to deal with complex signatures or inheritance. For the sake of consistency, the record component registry follows however a similar pattern without introducing unnecessary complexity.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
RecordComponentRegistry.Compiled
Represents a compiled record component registry.static class
RecordComponentRegistry.Default
An immutable default implementation of a record component registry.
-
Method Summary
All Methods Instance Methods Abstract 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.
-
-
-
Method Detail
-
prepend
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.- 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
RecordComponentRegistry.Compiled compile(TypeDescription instrumentedType)
Prepares the record component registry for a given instrumented type.- Parameters:
instrumentedType
- The instrumented type.- Returns:
- A prepared record component registry.
-
-