Class DefaultInterceptorCreator

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.
  • Constructor Details

    • DefaultInterceptorCreator

      @Deprecated public DefaultInterceptorCreator()
      Deprecated.
      this is a Java ServiceLoader implementation and the constructor should not be used directly
      Service loader based constructor.
  • Method Details

    • reset

      public boolean reset(boolean deep)
      Description copied from interface: Resettable
      Resets the state of this object.
      Specified by:
      reset in interface Resettable
      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

      public DefaultInterceptorCreator allowListedAnnotationTypes(Set<String> 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

      public Set<String> allowListedAnnotationTypes()
      Description copied from interface: InterceptorCreator
      Applicable when InterceptorCreator.Strategy.ALLOW_LISTED is in use.
      Specified by:
      allowListedAnnotationTypes in interface InterceptorCreator
      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: InterceptorCreator
      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.
      Specified by:
      createInterceptorPlan in interface InterceptorCreator
      Parameters:
      interceptedService - the service being intercepted
      processEnv - 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: InterceptorCreator
      Returns the processor appropriate for the context revealed in the calling arguments, favoring reflection if the serviceTypeElement is provided.
      Specified by:
      createInterceptorProcessor in interface InterceptorCreator
      Parameters:
      interceptedService - the service being intercepted
      delegateCreator - the "real" creator
      processEnv - optionally, the processing environment (should be passed if in annotation processor)
      Returns:
      the processor to use for the given arguments