public class Chainer<T>
extends java.lang.Object
implements java.lang.reflect.InvocationHandler
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.| Constructor and Description |
|---|
Chainer() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(int i,
T element) |
void |
add(T element) |
boolean |
contains(T element) |
T |
get(int i) |
java.util.List<T> |
getAsList() |
java.lang.Object |
invoke(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object[] args) |
T |
remove(int i) |
public void add(T element)
public void add(int i,
T element)
public T remove(int i)
public T get(int i)
public boolean contains(T element)
public java.util.List<T> getAsList()
public java.lang.Object invoke(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object[] args)
throws java.lang.Throwable
invoke in interface java.lang.reflect.InvocationHandlerjava.lang.ThrowableCopyright © 2011 OW2 Consortium. All Rights Reserved.