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>
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
Entry(ElementMatcher<? super RecordComponentDescription> matcher, RecordComponentAttributeAppender recordComponentAttributeAppender, Transformer<RecordComponentDescription> transformer)
Creates a new entry.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected 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.
-
-
-
Constructor Detail
-
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 Detail
-
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
public boolean matches(RecordComponentDescription target)
Matches a target against this element matcher.- Specified by:
matches
in interfaceElementMatcher<RecordComponentDescription>
- Parameters:
target
- The instance to be matched.- Returns:
true
if the given element is matched by this matcher orfalse
otherwise.
-
-