Package net.bytebuddy.dynamic.scaffold
Class RecordComponentRegistry.Default.Compiled.Entry
java.lang.Object
net.bytebuddy.dynamic.scaffold.RecordComponentRegistry.Default.Compiled.Entry
- All Implemented Interfaces:
ElementMatcher<RecordComponentDescription>
- Enclosing class:
RecordComponentRegistry.Default.Compiled
@Enhance
protected static class RecordComponentRegistry.Default.Compiled.Entry
extends Object
implements ElementMatcher<RecordComponentDescription>
An entry of a compiled record component registry.
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.bytebuddy.matcher.ElementMatcher
ElementMatcher.Junction<S>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ElementMatcher
<? super RecordComponentDescription> The matcher to identify any record component that this definition concerns.private final RecordComponentAttributeAppender
The record component attribute appender to apply on any matched record component.private final Transformer
<RecordComponentDescription> The record component transformer to apply to any matched record component. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Entry
(ElementMatcher<? super RecordComponentDescription> matcher, RecordComponentAttributeAppender recordComponentAttributeAppender, Transformer<RecordComponentDescription> transformer) Creates a new entry. -
Method Summary
Modifier and TypeMethodDescriptionprotected TypeWriter.RecordComponentPool.Record
bind
(TypeDescription instrumentedType, RecordComponentDescription recordComponentDescription) Binds this entry to the provided record component description.boolean
matches
(RecordComponentDescription target) Matches a target against this element matcher.
-
Field Details
-
matcher
The matcher to identify any record component that this definition concerns. -
recordComponentAttributeAppender
The record component attribute appender to apply on any matched record component. -
transformer
The record component transformer to apply to any matched record component.
-
-
Constructor Details
-
Entry
protected Entry(ElementMatcher<? super RecordComponentDescription> matcher, RecordComponentAttributeAppender recordComponentAttributeAppender, Transformer<RecordComponentDescription> transformer) Creates a new entry.- Parameters:
matcher
- The matcher to identify any record component that this definition concerns.recordComponentAttributeAppender
- The record component attribute appender to apply on any matched record component.transformer
- The record component transformer to apply to any matched record component.
-
-
Method Details
-
bind
protected TypeWriter.RecordComponentPool.Record bind(TypeDescription instrumentedType, RecordComponentDescription recordComponentDescription) Binds this entry to the provided record component description.- Parameters:
instrumentedType
- The instrumented type for which this entry applies.recordComponentDescription
- The record component description to be bound to this entry.- Returns:
- A record representing the binding of this entry to the provided record component.
-
matches
Matches a target against this element matcher.- Specified by:
matches
in interfaceElementMatcher<RecordComponentDescription>
- Parameters:
target
- The instance to be matched ornull
.- Returns:
true
if the given element is matched by this matcher orfalse
otherwise.
-