Interface CustomInjectorRegistryCustomizer

All Superinterfaces:
Ordered
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface CustomInjectorRegistryCustomizer extends Ordered
Callback interface for customizing a CustomInjectorRegistry.

Users can provide beans of this type via @Configuration classes with @Bean methods to register custom injectors during context initialization.

Example usage:

 @Configuration
 public class MyInjectorsConfig {

     @Bean
     public CustomInjectorRegistryCustomizer registerMyInjector(SomeDep dep) {
         return registry -> registry.register(new MyInjector(dep));
     }
 }
 

Customizers are applied in order during the DEFINITIONS_READY phase, before bean instantiation begins. Implement Ordered.getOrder() to control the order in which customizers are applied; lower values are applied first.

See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    customize(@NotNull CustomInjectorRegistry registry)
    Customize the given registry by registering, unregistering, or otherwise modifying injectors.

    Methods inherited from interface tech.guilhermekaua.spigotboot.core.context.lifecycle.Ordered

    getOrder
  • Method Details

    • customize

      void customize(@NotNull @NotNull CustomInjectorRegistry registry)
      Customize the given registry by registering, unregistering, or otherwise modifying injectors.
      Parameters:
      registry - the registry to customize, not null