Lines Matching refs:Proxy
23 import java.lang.reflect.Proxy;
34 Object proxy = createProxy(proxyMe);
36 if (!Proxy.isProxyClass(proxy.getClass()))
37 System.err.println("not a proxy class?");
38 if (Proxy.getInvocationHandler(proxy) == null)
39 System.err.println("ERROR: Proxy.getInvocationHandler is null");
42 Shapes shapes = (Shapes) proxy;
46 Quads quads = (Quads) proxy;
49 Colors colors = (Colors) proxy;
54 Trace trace = (Trace) proxy;
71 * Exercise annotations on Proxy classes. This is mostly to ensure
75 Method[] methods = proxy.getClass().getDeclaredMethods();
85 System.out.println("Proxy interfaces: " +
86 Arrays.deepToString(proxy.getClass().getInterfaces()));
87 System.out.println("Proxy methods: " +
101 /* create the proxy class */
102 Class<?> proxyClass = Proxy.getProxyClass(Shapes.class.getClassLoader(),
106 /* create a proxy object, passing the handler object in */
107 Object proxy = null;
111 proxy = cons.newInstance(handler);
122 return proxy;
227 * Invocation handler, defining the implementation of the proxy functions.
237 * This is called when anything gets invoked in the proxy object.
239 public Object invoke(Object proxy, Method method, Object[] args)