KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > dynaop > ProxyContext


1 package dynaop;
2
3 import java.lang.reflect.Method JavaDoc;
4
5 /**
6  * Proxy instance context.
7  *
8  * @author Bob Lee (crazybob@crazybob.org)
9  */

10 public interface ProxyContext {
11
12     /**
13      * Gets {@link ProxyType} for this proxy.
14      */

15     ProxyType getProxyType();
16     
17     /**
18      * Gets interceptors assigned to method. Performs defensive copy of
19      * interceptor array.
20      */

21     Interceptor[] getInterceptors(Method JavaDoc method);
22
23     /**
24      * Gets proxied object. Returns wrapped object for dynamic proxies,
25      * and creates new, non-proxied copy for class proxies.
26      */

27     Object JavaDoc unwrap();
28     
29     /**
30      * Is this a class proxy (as opposed to a dynamic proxy)?
31      */

32     boolean isClassProxy();
33     
34     /**
35      * Gets serializable proxy reference.
36      */

37     Handle getHandle();
38 }
39
Popular Tags