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 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 RecordComponentAttributeAppenderThe 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
ConstructorsModifierConstructorDescriptionprotectedEntry(ElementMatcher<? super RecordComponentDescription> matcher, RecordComponentAttributeAppender recordComponentAttributeAppender, Transformer<RecordComponentDescription> transformer) Creates a new entry. -
Method Summary
Modifier and TypeMethodDescriptionprotected TypeWriter.RecordComponentPool.Recordbind(TypeDescription instrumentedType, RecordComponentDescription recordComponentDescription) Binds this entry to the provided record component description.booleanmatches(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:
matchesin interfaceElementMatcher<RecordComponentDescription>- Parameters:
target- The instance to be matched ornull.- Returns:
trueif the given element is matched by this matcher orfalseotherwise.
-