Interface RecordComponentRegistry

  • All Known Implementing Classes:
    RecordComponentRegistry.Default

    public interface RecordComponentRegistry
    A record component registry represents an extendable collection of record components which are identified by their names that are mapped to a given 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.
    • Method Detail

      • prepend

        RecordComponentRegistry prepend​(LatentMatcher<? super RecordComponentDescription> matcher,
                                        RecordComponentAttributeAppender.Factory recordComponentAttributeAppenderFactory,
                                        Transformer<RecordComponentDescription> transformer)
        Prepends the given record component definition to this record component registry, i.e. this configuration is applied first.
        Parameters:
        matcher - The matcher to identify any record component that this definition concerns.
        recordComponentAttributeAppenderFactory - The record component attribute appender factory to apply on any matched record component.
        transformer - The record component transformer to apply to any matched record component.
        Returns:
        An adapted version of this method registry.
      • compile

        RecordComponentRegistry.Compiled compile​(TypeDescription instrumentedType)
        Prepares the record component registry for a given instrumented type.
        Parameters:
        instrumentedType - The instrumented type.
        Returns:
        A prepared record component registry.