- All Known Implementing Classes:
DefaultInterceptorCreator
Provides the strategy used to determine which annotations cause interceptor creation. Only services that are pico-
activated may qualify for interception.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceAbstraction for interceptor processing.static enumThe strategy applied for resolving annotations that trigger interception. -
Method Summary
Modifier and TypeMethodDescriptionApplicable whenInterceptorCreator.Strategy.ALLOW_LISTEDis in use.createInterceptorPlan(ServiceInfoBasics interceptedService, ProcessingEnvironment processingEnvironment, Set<String> annotationTypeTriggers) After an annotation qualifies the enclosing service for interception, this method will be used to provide the injection plan that applies to that service type.createInterceptorProcessor(ServiceInfoBasics interceptedService, InterceptorCreator delegateCreator, Optional<ProcessingEnvironment> processEnv) Returns the processor appropriate for the context revealed in the calling arguments, favoring reflection if the serviceTypeElement is provided.default booleanisAllowListed(String annotationType) Applicable whenInterceptorCreator.Strategy.CUSTOMis in use.default InterceptorCreator.Strategystrategy()Determines the strategy being applied.
-
Method Details
-
strategy
Determines the strategy being applied.- Returns:
- the strategy being applied
-
allowListedAnnotationTypes
Applicable whenInterceptorCreator.Strategy.ALLOW_LISTEDis in use.- Returns:
- the set of type names that should trigger creation
-
isAllowListed
Applicable whenInterceptorCreator.Strategy.CUSTOMis in use.- Parameters:
annotationType- the annotation type name- Returns:
- true if the annotation type should trigger interceptor creation
-
createInterceptorPlan
Optional<InterceptionPlan> createInterceptorPlan(ServiceInfoBasics interceptedService, ProcessingEnvironment processingEnvironment, Set<String> annotationTypeTriggers) After an annotation qualifies the enclosing service for interception, this method will be used to provide the injection plan that applies to that service type.- Parameters:
interceptedService- the service being interceptedprocessingEnvironment- optionally, the processing environment (if being called by annotation processing)annotationTypeTriggers- the set of annotation names that are associated with interception.- Returns:
- the injection plan, or empty for the implementation to use the default strategy for creating a plan
-
createInterceptorProcessor
InterceptorCreator.InterceptorProcessor createInterceptorProcessor(ServiceInfoBasics interceptedService, InterceptorCreator delegateCreator, Optional<ProcessingEnvironment> processEnv) Returns the processor appropriate for the context revealed in the calling arguments, favoring reflection if the serviceTypeElement is provided.- Parameters:
interceptedService- the service being intercepteddelegateCreator- the "real" creatorprocessEnv- optionally, the processing environment (should be passed if in annotation processor)- Returns:
- the processor to use for the given arguments
-