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 java.lang.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
Fields Modifier and Type Field Description private ElementMatcher<? super RecordComponentDescription>matcherThe matcher to identify any record component that this definition concerns.private RecordComponentAttributeAppenderrecordComponentAttributeAppenderThe record component attribute appender to apply on any matched record component.private Transformer<RecordComponentDescription>transformerThe record component transformer to apply to any matched record component.
-
Constructor Summary
Constructors Modifier Constructor Description protectedEntry(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.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 Detail
-
matcher
private final ElementMatcher<? super RecordComponentDescription> matcher
The matcher to identify any record component that this definition concerns.
-
recordComponentAttributeAppender
private final RecordComponentAttributeAppender recordComponentAttributeAppender
The record component attribute appender to apply on any matched record component.
-
transformer
private final Transformer<RecordComponentDescription> transformer
The record component transformer to apply to any matched record component.
-
-
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:
matchesin interfaceElementMatcher<RecordComponentDescription>- Parameters:
target- The instance to be matched.- Returns:
trueif the given element is matched by this matcher orfalseotherwise.
-
-