Class MethodInterceptorFactory

  • All Implemented Interfaces:
    InterceptorFactory

    public final class MethodInterceptorFactory
    extends Object
    implements InterceptorFactory
    An interceptor factory for interceptor objects which call a specific method via reflection. If this factory is called more than once in the same context, it will return the same interceptor instance.
    Author:
    David M. Lloyd
    • Constructor Detail

      • MethodInterceptorFactory

        public MethodInterceptorFactory​(InterceptorInstanceFactory instanceFactory,
                                        Method interceptorMethod,
                                        boolean changeMethod)
        Construct a new instance.
        Parameters:
        instanceFactory - the instance factory for the interceptor instance
        interceptorMethod - the interceptor method
        changeMethod - true to change the method on the context to equal the given method, false to leave it as-is
      • MethodInterceptorFactory

        public MethodInterceptorFactory​(InterceptorInstanceFactory instanceFactory,
                                        Method interceptorMethod)
        Construct a new instance.
        Parameters:
        instanceFactory - the instance factory for the interceptor instance
        interceptorMethod - the interceptor method