org.ow2.orchestra.util
Class Chainer<T>
java.lang.Object
org.ow2.orchestra.util.Chainer<T>
- All Implemented Interfaces:
- InvocationHandler
public class Chainer<T>
- extends Object
- implements InvocationHandler
Generic chainer.
This InvocationHandler allows chaining of void only
method invocations.
If an exception is raised during the invocation of a void
method in the chain, then the forwarding is stopped, and the exception will
be raised up.
Note that if a non-void method is invoked, an
IllegalArgumentException is thrown.
- Author:
- Pierre Vigneras
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Chainer
public Chainer()
add
public void add(T element)
add
public void add(int i,
T element)
remove
public T remove(int i)
get
public T get(int i)
contains
public boolean contains(T element)
getAsList
public List<T> getAsList()
invoke
public Object invoke(Object proxy,
Method method,
Object[] args)
throws Throwable
- Specified by:
invoke in interface InvocationHandler
- Throws:
Throwable
Copyright © 2012 OW2 Consortium. All Rights Reserved.