- All Known Implementing Classes:
DefaultActivatorCreator
Implementors of this contract are responsible for code-generating the Pico
Activators and ServiceProviders for service types found in your DI-enabled
module.
The typical scenario will have 1-SingletonServiceType:1-GeneratedPicoActivatorClassForThatService: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 pico code-generated
Module class.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptioncodegenInterceptors(GeneralCreatorRequest request, Map<TypeName, InterceptionPlan> interceptionPlans) Generates just the interceptors.toActivatorImplTypeName(TypeName activatorTypeName) Generates the would-be implementation type name that will be generated ifcreateModuleActivators(ActivatorCreatorRequest)were to be called on this creator.
-
Method Details
-
createModuleActivators
Used during annotation processing in compile time to automatically generateActivator's and optionally an aggregatingModulefor those activators.- Parameters:
request- the request for what to generate- Returns:
- the response result for the create operation
-
codegenInterceptors
InterceptorCreatorResponse codegenInterceptors(GeneralCreatorRequest request, Map<TypeName, InterceptionPlan> interceptionPlans) Generates just the interceptors.- Parameters:
request- the request for what to generateinterceptionPlans- the interceptor plans- Returns:
- the response result for the create operation
-
toActivatorImplTypeName
Generates the would-be implementation type name that will be generated ifcreateModuleActivators(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
-