On 14/09/2011 16:46, Kurchi Hazra wrote:
+ Class<?>[] cl = new Class[2]; + cl[0] = SocketAddress.class; + cl[1] = Integer.TYPE; + Class<?> clazz = impl.getClass();
I have to say, I think that would read better as:
Class<?>[] cl = { SocketAddress.class, int.class };
Class<?> clazz = impl.getClass();
Or better, remove cl and change:
clazz.getDeclaredMethod("connect", cl);
to:
clazz.getDeclaredMethod(
"connect", SocketAddress.class, int.class
);
Tom
