net.sf.tie
Class InterceptorStack

java.lang.Object
  extended by net.sf.tie.InterceptorStack

public final class InterceptorStack
extends Object

A utilty class for creating a MethodInterceptorStack.


Method Summary
static MethodInterceptorStack empty()
          Creates an empty stack.
The returned stack is implemented such that the MethodInterceptorStack.getInterceptors(Class, Object) method will always return an empty iterable.
static MethodInterceptorStack singleton(MethodInterceptor interceptor)
          Creates a stack containing a single MethodInterceptor.
The returned stack is implemented such that the MethodInterceptorStack.getInterceptors(Class, Object) method will always return the single interceptor, interceptor.
static MethodInterceptorStack stack(Iterable<MethodInterceptor> stack)
          Creates a stack containing a collection of MethodInterceptor objects.
The returned stack is implemented such that the MethodInterceptorStack.getInterceptors(Class, Object) method will always return stack.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

stack

public static MethodInterceptorStack stack(Iterable<MethodInterceptor> stack)
Creates a stack containing a collection of MethodInterceptor objects.
The returned stack is implemented such that the MethodInterceptorStack.getInterceptors(Class, Object) method will always return stack.


singleton

public static MethodInterceptorStack singleton(MethodInterceptor interceptor)
Creates a stack containing a single MethodInterceptor.
The returned stack is implemented such that the MethodInterceptorStack.getInterceptors(Class, Object) method will always return the single interceptor, interceptor.


empty

public static MethodInterceptorStack empty()
Creates an empty stack.
The returned stack is implemented such that the MethodInterceptorStack.getInterceptors(Class, Object) method will always return an empty iterable.