Interface ActivatorCreator

All Known Implementing Classes:
ActivatorCreatorDefault

@Contract public interface ActivatorCreator
Implementors of this contract are responsible for code-generating the Activators and ServiceProviders for service types found in your DI-enabled module.

The typical scenario will have 1-SingletonServiceType:1-GeneratedInjectionActivatorClassForThatService:1-ServiceProvider representation in the Services registry that can be lazily activated.

Activators are only generated if your service is marked as a jakarta.inject.Singleton scoped service.

All activators for your jar module are then aggregated and registered into a code-generated ModuleComponent class.

See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    io.helidon.inject.tools.InterceptorCreatorResponse
    codegenInterceptors(io.helidon.inject.tools.CodeGenInterceptorRequest request)
    Generates just the interceptors.
    io.helidon.inject.tools.ActivatorCreatorResponse
    createModuleActivators(io.helidon.inject.tools.ActivatorCreatorRequest request)
    Used during annotation processing in compile time to automatically generate Activator's and optionally an aggregating ModuleComponent for those activators.
    toActivatorImplTypeName(TypeName activatorTypeName)
    Generates the would-be implementation type name that will be generated if createModuleActivators(ActivatorCreatorRequest) were to be called on this creator.
  • Method Details

    • createModuleActivators

      io.helidon.inject.tools.ActivatorCreatorResponse createModuleActivators(io.helidon.inject.tools.ActivatorCreatorRequest request)
      Used during annotation processing in compile time to automatically generate Activator's and optionally an aggregating ModuleComponent for those activators.
      Parameters:
      request - the request for what to generate
      Returns:
      the response result for the create operation
    • codegenInterceptors

      io.helidon.inject.tools.InterceptorCreatorResponse codegenInterceptors(io.helidon.inject.tools.CodeGenInterceptorRequest request)
      Generates just the interceptors.
      Parameters:
      request - the request for what to generate
      Returns:
      the response result for the create operation
    • toActivatorImplTypeName

      TypeName toActivatorImplTypeName(TypeName activatorTypeName)
      Generates the would-be implementation type name that will be generated if createModuleActivators(ActivatorCreatorRequest) were to be called on this creator.
      Parameters:
      activatorTypeName - the service/activator type name of the developer provided service type.
      Returns:
      the code generated implementation type name that would be code generated