|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.javasimon.proxy.DelegatingProxyFactory<T>
T - Type of the wrapped classpublic class DelegatingProxyFactory<T>
Produces proxy that wrap and existing class using Proxy class.
This class is used to do lightweight AOP.
| Field Summary | |
|---|---|
private T |
delegate
Wrapped class and concrete implementation |
| Constructor Summary | |
|---|---|
DelegatingProxyFactory(T delegate)
Main constructor |
|
| Method Summary | ||
|---|---|---|
T |
getDelegate()
Return Wrapped class and concrete implementation. |
|
protected Object |
invoke(DelegatingMethodInvocation<T> delegatingMethodInvocation)
Method to override in child classes |
|
Object |
invoke(Object proxy,
Method method,
Object[] args)
|
|
Object |
newProxy(Class<?>... interfaces)
Create a proxy using given classloader and interfaces. |
|
|
newProxy(Class<X> interfaces)
Create a proxy using given classloader and interfaces |
|
Object |
newProxy(ClassLoader classLoader,
Class<?>... interfaces)
Create a proxy using given classloader and interfaces |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private final T delegate
| Constructor Detail |
|---|
public DelegatingProxyFactory(T delegate)
delegate - Wrapped class and concrete implementation| Method Detail |
|---|
public final Object invoke(Object proxy,
Method method,
Object[] args)
throws Throwable
invoke in interface InvocationHandlerThrowable
protected Object invoke(DelegatingMethodInvocation<T> delegatingMethodInvocation)
throws Throwable
delegatingMethodInvocation - Method invocation (arguments, method name, etc.)
Throwable - Method invocation raised exceptionpublic T getDelegate()
getDelegate in interface Delegating<T>
public Object newProxy(ClassLoader classLoader,
Class<?>... interfaces)
classLoader - Class loaderinterfaces - Interfaces to implement
public Object newProxy(Class<?>... interfaces)
interfaces - Interfaces to implement
public <X> X newProxy(Class<X> interfaces)
classLoader - Class loaderinterfaces - Interface to implement
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||