Interface InterceptionMetadata


@Describe public interface InterceptionMetadata
Provides a service descriptor, or an intercepted instance with information whether to, and how to intercept elements.

Used (mostly) by generated code (passed as a parameter to ServiceDescriptor.inject(io.helidon.service.registry.DependencyContext, InterceptionMetadata, java.util.Set, Object), and ServiceDescriptor.instantiate(io.helidon.service.registry.DependencyContext, InterceptionMetadata)).

  • Method Details

    • createInvoker

      <T> InterceptionInvoker<T> createInvoker(ServiceInfo descriptor, Set<Qualifier> typeQualifiers, List<Annotation> typeAnnotations, TypedElementInfo element, InterceptionInvoker<T> targetInvoker, Set<Class<? extends Throwable>> checkedExceptions)
      Create an invoker that handles interception if needed, for constructors.
      Type Parameters:
      T - type of the result of the invoker
      Parameters:
      descriptor - metadata of the service being intercepted
      typeQualifiers - qualifiers on the type
      typeAnnotations - annotations on the type
      element - element being intercepted
      targetInvoker - invoker of the element
      checkedExceptions - expected checked exceptions that can be thrown by the invoker
      Returns:
      an invoker that handles interception if enabled and if there are matching interceptors, any checkedException will be re-thrown, any runtime exception will be re-thrown
    • createInvoker

      <T> InterceptionInvoker<T> createInvoker(Object serviceInstance, ServiceInfo descriptor, Set<Qualifier> typeQualifiers, List<Annotation> typeAnnotations, TypedElementInfo element, InterceptionInvoker<T> targetInvoker, Set<Class<? extends Throwable>> checkedExceptions)
      Create an invoker that handles interception if needed.
      Type Parameters:
      T - type of the result of the invoker
      Parameters:
      serviceInstance - instance of the service that is being intercepted
      descriptor - metadata of the service being intercepted
      typeQualifiers - qualifiers on the type
      typeAnnotations - annotations on the type
      element - element being intercepted
      targetInvoker - invoker of the element
      checkedExceptions - expected checked exceptions that can be thrown by the invoker
      Returns:
      an invoker that handles interception if enabled and if there are matching interceptors, any checkedException will be re-thrown, any runtime exception will be re-thrown