RecordComponentAttributeAppender. Record components
can be uniquely identified by their name for a given type since record components are never inherited.
This registry is the counterpart of a
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.
| Modifier and Type | Class and Description |
|---|---|
| public static interface | RecordComponentRegistry.Compiled
Represents a compiled record component registry. |
| public static class | RecordComponentRegistry.Default
An immutable default implementation of a record component registry. |
| Modifier and Type | Method and Description |
|---|---|
| public RecordComponentRegistry. | Returns: A prepared record component registry.The instrumented type. instrumentedType)Prepares the record component registry for a given instrumented type. |
| public RecordComponentRegistry | Returns: An adapted version of this method registry.The matcher to identify any record component that this definition concerns. matcher, RecordComponentAttributeAppender.The record component attribute appender factory to apply on any matched record component. recordComponentAttributeAppenderFactory,The record component transformer to apply to any matched record component. transformer)Prepends the given record component definition to this record component registry, i.e. this configuration is applied first. |
| compile | back to summary |
|---|---|
| public RecordComponentRegistry. Prepares the record component registry for a given instrumented type.
| |
| prepend | back to summary |
|---|---|
| public RecordComponentRegistry prepend(LatentMatcher<? super RecordComponentDescription> matcher, RecordComponentAttributeAppender. Prepends the given record component definition to this record component registry, i.e. this configuration is applied first.
| |
| Modifier and Type | Class and Description |
|---|---|
| public static enum | RecordComponentRegistry.Compiled.NoOp
A no-op record component registry that does not register annotations for any record component. |
| Modifier and Type | Field and Description |
|---|---|
| public static final RecordComponentRegistry. | INSTANCE
The singleton instance. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public TypeWriter. | target(RecordComponentDescription
The record component being processed. recordComponentDescription)Implements net. |
| public static RecordComponentRegistry. | |
| public static RecordComponentRegistry. |
| INSTANCE | back to summary |
|---|---|
| public static final RecordComponentRegistry. The singleton instance. | |
| NoOp | back to summary |
|---|---|
| private NoOp() | |
| target | back to summary |
|---|---|
| public TypeWriter. Implements net. Doc from net. Looks up a handler entry for a given record component.
| |
| valueOf | back to summary |
|---|---|
| public static RecordComponentRegistry. | |
| values | back to summary |
|---|---|
| public static RecordComponentRegistry. | |
| Modifier and Type | Class and Description |
|---|---|
| protected static class | RecordComponentRegistry.Default.Compiled
A compiled default record component registry. |
| protected static class | RecordComponentRegistry.Default.Entry
An entry of the default record component registry. |
| Modifier and Type | Field and Description |
|---|---|
| private final List | entries
This registries entries. |
| Access | Constructor and Description |
|---|---|
| public | |
| private | Default(List<RecordComponentRegistry.
The entries of the record component registry. entriesCreates a new default record component registry. |
| Modifier and Type | Method and Description |
|---|---|
| public RecordComponentRegistry. | compile(TypeDescription
The instrumented type. instrumentedType)Implements net. |
| public RecordComponentRegistry | prepend(LatentMatcher<? super RecordComponentDescription>
The matcher to identify any record component that this definition concerns. matcher, RecordComponentAttributeAppender.The record component attribute appender factory to apply on any matched record component. recordComponentAttributeAppenderFactory,The record component transformer to apply to any matched record component. transformer)Implements net. |
| entries | back to summary |
|---|---|
| private final List<RecordComponentRegistry. This registries entries. | |
| Default | back to summary |
|---|---|
| public Default() Creates a new empty default record component registry. | |
| Default | back to summary |
|---|---|
| private Default(List<RecordComponentRegistry. Creates a new default record component registry.
| |
| compile | back to summary |
|---|---|
| public RecordComponentRegistry. Implements net. Doc from net. Prepares the record component registry for a given instrumented type.
| |
| prepend | back to summary |
|---|---|
| public RecordComponentRegistry prepend(LatentMatcher<? super RecordComponentDescription> matcher, RecordComponentAttributeAppender. Implements net. Doc from net. Prepends the given record component definition to this record component registry, i.e. this configuration is applied first.
| |
| Modifier and Type | Class and Description |
|---|---|
| protected static class | RecordComponentRegistry.Default.Compiled.Entry
An entry of a compiled record component registry. |
| Modifier and Type | Field and Description |
|---|---|
| private final List | entries
The entries of this compiled record component registry. |
| private final TypeDescription | instrumentedType
The instrumented type for which this registry was compiled for. |
| Access | Constructor and Description |
|---|---|
| protected | Compiled(TypeDescription
The instrumented type for which this registry was compiled for. instrumentedType, List<RecordComponentRegistry.The entries of this compiled record component registry. entriesCreates a new compiled record component registry. |
| Modifier and Type | Method and Description |
|---|---|
| public TypeWriter. | target(RecordComponentDescription
The record component being processed. recordComponentDescription)Implements net. |
| entries | back to summary |
|---|---|
| private final List<RecordComponentRegistry. The entries of this compiled record component registry. | |
| instrumentedType | back to summary |
|---|---|
| private final TypeDescription instrumentedType The instrumented type for which this registry was compiled for. | |
| Compiled | back to summary |
|---|---|
| protected Compiled(TypeDescription instrumentedType, List<RecordComponentRegistry. Creates a new compiled record component registry.
| |
| target | back to summary |
|---|---|
| public TypeWriter. Implements net. Doc from net. Looks up a handler entry for a given record component.
| |
| Modifier and Type | Field and Description |
|---|---|
| private final ElementMatcher | matcher
The matcher to identify any record component that this definition concerns. |
| private final RecordComponentAttributeAppender | recordComponentAttributeAppender
The record component attribute appender to apply on any matched record component. |
| private final Transformer | transformer
The record component transformer to apply to any matched record component. |
| Access | Constructor and Description |
|---|---|
| protected | Entry(ElementMatcher<? super RecordComponentDescription>
The matcher to identify any record component that this definition concerns. matcher, RecordComponentAttributeAppender The record component attribute appender to apply on any matched record component. recordComponentAttributeAppender, Transformer<RecordComponentDescription> The record component transformer to apply to any matched record component. transformer)Creates a new entry. |
| Modifier and Type | Method and Description |
|---|---|
| protected TypeWriter. | Returns: A record representing the binding of this entry to the provided record component.The instrumented type for which this entry applies. instrumentedType, RecordComponentDescription The record component description to be bound to this entry. recordComponentDescription)Binds this entry to the provided record component description. |
| public boolean | matches(RecordComponentDescription
The instance to be matched or target)null.Implements net. |
| matcher | back to summary |
|---|---|
| private final ElementMatcher<? super RecordComponentDescription> matcher The matcher to identify any record component that this definition concerns. | |
| recordComponentAttributeAppender | back to summary |
|---|---|
| private final RecordComponentAttributeAppender recordComponentAttributeAppender The record component attribute appender to apply on any matched record component. | |
| transformer | back to summary |
|---|---|
| private final Transformer<RecordComponentDescription> transformer The record component transformer to apply to any matched record component. | |
| Entry | back to summary |
|---|---|
| protected Entry(ElementMatcher<? super RecordComponentDescription> matcher, RecordComponentAttributeAppender recordComponentAttributeAppender, Transformer<RecordComponentDescription> transformer) Creates a new entry.
| |
| bind | back to summary |
|---|---|
| protected TypeWriter. Binds this entry to the provided record component description.
| |
| matches | back to summary |
|---|---|
| public boolean matches(RecordComponentDescription target) Implements net. Doc from net. Matches a target against this element matcher.
| |
| Modifier and Type | Field and Description |
|---|---|
| private final LatentMatcher | matcher
The matcher to identify any record component that this definition concerns. |
| private final RecordComponentAttributeAppender. | recordComponentAttributeAppender
The record component attribute appender factory to apply on any matched record component. |
| private final Transformer | transformer
The record component transformer to apply to any matched record component. |
| Access | Constructor and Description |
|---|---|
| protected | Entry(LatentMatcher<? super RecordComponentDescription>
The matcher to identify any record component that this definition concerns. matcher, RecordComponentAttributeAppender.The record component attribute appender factory to apply on any matched record component. recordComponentAttributeAppender,The record component transformer to apply to any matched record component. transformer)Creates a new entry. |
| Modifier and Type | Method and Description |
|---|---|
| protected RecordComponentAttributeAppender. | Returns: The record component attribute appender factory to apply on any matched record component.Returns the record component attribute appender factory to apply on any matched record component. |
| protected Transformer | Returns: The record component transformer to apply to any matched record component.Returns the record component transformer to apply to any matched record component. |
| public ElementMatcher | resolve(TypeDescription
The type description for which the represented matcher should be resolved. typeDescription)Implements net. |
| matcher | back to summary |
|---|---|
| private final LatentMatcher<? super RecordComponentDescription> matcher The matcher to identify any record component that this definition concerns. | |
| recordComponentAttributeAppender | back to summary |
|---|---|
| private final RecordComponentAttributeAppender. The record component attribute appender factory to apply on any matched record component. | |
| transformer | back to summary |
|---|---|
| private final Transformer<RecordComponentDescription> transformer The record component transformer to apply to any matched record component. | |
| Entry | back to summary |
|---|---|
| protected Entry(LatentMatcher<? super RecordComponentDescription> matcher, RecordComponentAttributeAppender. Creates a new entry.
| |
| getRecordComponentAttributeAppender | back to summary |
|---|---|
| protected RecordComponentAttributeAppender. Returns the record component attribute appender factory to apply on any matched record component.
| |
| getTransformer | back to summary |
|---|---|
| protected Transformer Returns the record component transformer to apply to any matched record component.
| |
| resolve | back to summary |
|---|---|
| public ElementMatcher Implements net. Doc from net. Resolves the element matcher this instance represents for the supplied type description.
| |