Home | History | Annotate | Download | only in src

Lines Matching full:proxy

23 import java.lang.reflect.Proxy;
33 Object proxy = createProxy(proxyMe);
35 if (!Proxy.isProxyClass(proxy.getClass()))
36 System.err.println("not a proxy class?");
37 if (Proxy.getInvocationHandler(proxy) == null)
38 System.err.println("ERROR: Proxy.getInvocationHandler is null");
41 Shapes shapes = (Shapes) proxy;
45 Quads quads = (Quads) proxy;
48 Colors colors = (Colors) proxy;
68 * Exercise annotations on Proxy classes. This is mostly to ensure
72 Method[] methods = proxy.getClass().getDeclaredMethods();
73 System.out.println("Proxy methods: " + Arrays.deepToString(methods));
79 Field[] fields = proxy.getClass().getDeclaredFields();
80 System.out.println("Proxy fields: " + Arrays.deepToString(fields));
87 /* create the proxy class */
88 Class proxyClass = Proxy.getProxyClass(Shapes.class.getClassLoader(),
91 /* create a proxy object, passing the handler object in */
92 Object proxy = null;
98 proxy = cons.newInstance(new Object[] { handler });
109 return proxy;
210 * Invocation handler, defining the implementation of the proxy functions.
220 * This is called when anything gets invoked in the proxy object.
222 public Object invoke(Object proxy, Method method, Object[] args)