|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ProxyFactory
Abstraction layer for proxy generation. Depending on this interface (rather than Proxy
directly) will allow you to use Java's standard proxy mechanism interchangeably with e.g. CGLIB.
Method Summary | ||
---|---|---|
boolean |
canProxy(Class<?> type)
Test if the ProxyFactory implementation is capable of creating a proxy instance for the given type. |
|
|
createProxy(Invoker invoker,
Class<?>... types)
Create a new proxy instance. |
|
Invoker |
getInvoker(Object proxy)
Retrieve the invocation handler of the proxy. |
|
boolean |
isProxyClass(Class<?> type)
Test if the given type is a proxy class. |
Method Detail |
---|
<T> T createProxy(Invoker invoker, Class<?>... types)
T
- The proxy's type.invoker
- the invocation handler.types
- the types the proxy must emulate.
boolean canProxy(Class<?> type)
type
- the type to create a proxy instance for.
true
if the type is supported.boolean isProxyClass(Class<?> type)
type
- the type to examine.
true
if the given type is a proxy class.Invoker getInvoker(Object proxy)
proxy
- the proxy instance.
Invoker
instance acting as invocation handler.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |