java.lang.Object
io.helidon.pico.tools.AbstractCreator
io.helidon.pico.tools.DefaultInterceptorCreator
- All Implemented Interfaces:
Resettable,InterceptorCreator
@Singleton
public class DefaultInterceptorCreator
extends AbstractCreator
implements InterceptorCreator, Resettable
The default
InterceptorCreator provider in use.-
Nested Class Summary
Nested classes/interfaces inherited from interface io.helidon.pico.tools.spi.InterceptorCreator
InterceptorCreator.InterceptorProcessor, InterceptorCreator.Strategy -
Field Summary
Fields inherited from class io.helidon.pico.tools.AbstractCreator
DEFAULT_SOURCE, DEFAULT_TARGET -
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.this is a Java ServiceLoader implementation and the constructor should not be used directly -
Method Summary
Modifier and TypeMethodDescriptionApplicable whenInterceptorCreator.Strategy.ALLOW_LISTEDis in use.allowListedAnnotationTypes(Set<String> allowListedAnnotationTypes) Sets the allow-listed annotation types triggering interception creation for the default interceptor creator.createInterceptorPlan(ServiceInfoBasics interceptedService, ProcessingEnvironment processEnv, 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.io.helidon.pico.tools.DefaultInterceptorCreator.AbstractInterceptorProcessorcreateInterceptorProcessor(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.booleanreset(boolean deep) Resets the state of this object.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.helidon.pico.tools.spi.InterceptorCreator
isAllowListed, strategy
-
Constructor Details
-
DefaultInterceptorCreator
Deprecated.this is a Java ServiceLoader implementation and the constructor should not be used directlyService loader based constructor.
-
-
Method Details
-
reset
public boolean reset(boolean deep) Description copied from interface:ResettableResets the state of this object.- Specified by:
resetin interfaceResettable- Parameters:
deep- true to iterate over any contained objects, to reflect the reset into the retained object- Returns:
- returns true if the state was changed
-
allowListedAnnotationTypes
Sets the allow-listed annotation types triggering interception creation for the default interceptor creator.- Parameters:
allowListedAnnotationTypes- the allow-listed annotation types- Returns:
- this instance
-
allowListedAnnotationTypes
Description copied from interface:InterceptorCreatorApplicable whenInterceptorCreator.Strategy.ALLOW_LISTEDis in use.- Specified by:
allowListedAnnotationTypesin interfaceInterceptorCreator- Returns:
- the set of type names that should trigger creation
-
createInterceptorPlan
public Optional<InterceptionPlan> createInterceptorPlan(ServiceInfoBasics interceptedService, ProcessingEnvironment processEnv, Set<String> annotationTypeTriggers) Description copied from interface:InterceptorCreatorAfter an annotation qualifies the enclosing service for interception, this method will be used to provide the injection plan that applies to that service type.- Specified by:
createInterceptorPlanin interfaceInterceptorCreator- Parameters:
interceptedService- the service being interceptedprocessEnv- 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
public io.helidon.pico.tools.DefaultInterceptorCreator.AbstractInterceptorProcessor createInterceptorProcessor(ServiceInfoBasics interceptedService, InterceptorCreator delegateCreator, Optional<ProcessingEnvironment> processEnv) Description copied from interface:InterceptorCreatorReturns the processor appropriate for the context revealed in the calling arguments, favoring reflection if the serviceTypeElement is provided.- Specified by:
createInterceptorProcessorin interfaceInterceptorCreator- 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
-