Class InterceptorBuilder

java.lang.Object
org.jboss.arquillian.graphene.intercept.InterceptorBuilder

public class InterceptorBuilder extends Object
The builder for new interceptors for type-safe definition of intercepted methods.
Author:
Lukas Fryc
  • Constructor Details

    • InterceptorBuilder

      public InterceptorBuilder()
  • Method Details

    • interceptInvocation

      public <T> T interceptInvocation(Class<T> type, Interceptor interceptor)
      Returns proxy for given type which execution causes remembering what method should be intercepted by given interceptor.
      Parameters:
      type - the type of the generated proxy
      interceptor - the interceptor for intercepting methods executed on generated proxy
      Returns:
      proxy for executing methods which shoyld be intercepted by given interceptor
    • build

      public Interceptor build()
      Builds the final version of Interceptor intercepting all methods recorded via interceptInvocation(Class, Interceptor).
      Returns:
      the final version of Interceptor