* config/rs6000/xcoff.h (ASM_OUTPUT_ALIGNED_COMMON): Use floor_log2.
[official-gcc.git] / libjava / testsuite / libjava.lang / TestProxy.java
blob08e16aa33c57df8a866a5c33e0eec90cc64f48d0
1 import java.lang.reflect.Proxy;
2 import java.lang.reflect.InvocationHandler;
3 import java.lang.reflect.Method;
4 import java.net.*;
6 public class TestProxy
8 public static class MyInvocationHandler implements InvocationHandler
10 public Object invoke (Object proxy,
11 Method method,
12 Object[] args)
13 throws Throwable
15 System.out.println (args[0]);
16 return null;
20 public static void main (String[] args)
22 try {
23 InvocationHandler ih = new MyInvocationHandler();
25 SocketOptions c = (SocketOptions)
26 Proxy.newProxyInstance (SocketOptions.class.getClassLoader(),
27 new Class[]{SocketOptions.class},
28 ih);
30 c.getOption (555);
32 } catch (Exception e) {
33 e.printStackTrace ();