@Test(expected = IllegalArgumentException.class) public void failsCreateProxyObjectForNull() { JsonUtils.createProxy(null); }
@SuppressWarnings({"unchecked"}) public static <T> T createProxy(Class<T> anInterface) { if (anInterface == null) { throw new IllegalArgumentException(); } if (anInterface.isInterface()) { return (T)Proxy.newProxyInstance(anInterface.getClassLoader(), new Class[]{anInterface}, new ProxyObject(anInterface)); } throw new IllegalArgumentException(String.format("Type '%s' is not interface. ", anInterface.getSimpleName())); }
JsonUtils { @SuppressWarnings({"unchecked"}) public static <T> T createProxy(Class<T> anInterface) { if (anInterface == null) { throw new IllegalArgumentException(); } if (anInterface.isInterface()) { return (T)Proxy.newProxyInstance(anInterface.getClassLoader(), new Class[]{anInterface}, new ProxyObject(anInterface)); } throw new IllegalArgumentException(String.format("Type '%s' is not interface. ", anInterface.getSimpleName())); } }
JsonUtils { @SuppressWarnings({"unchecked"}) public static <T> T createProxy(Class<T> anInterface) { if (anInterface == null) { throw new IllegalArgumentException(); } if (anInterface.isInterface()) { return (T)Proxy.newProxyInstance(anInterface.getClassLoader(), new Class[]{anInterface}, new ProxyObject(anInterface)); } throw new IllegalArgumentException(String.format("Type '%s' is not interface. ", anInterface.getSimpleName())); } private  JsonUtils(); }
JsonUtils { @SuppressWarnings({"unchecked"}) public static <T> T createProxy(Class<T> anInterface) { if (anInterface == null) { throw new IllegalArgumentException(); } if (anInterface.isInterface()) { return (T)Proxy.newProxyInstance(anInterface.getClassLoader(), new Class[]{anInterface}, new ProxyObject(anInterface)); } throw new IllegalArgumentException(String.format("Type '%s' is not interface. ", anInterface.getSimpleName())); } private  JsonUtils(); static String getJsonString(String string); static boolean isKnownType(Class<?> clazz); static Types getType(Object o); static Types getType(Class<?> clazz); static Set<String> getTransientFields(Class<?> aClass); @SuppressWarnings({"unchecked"}) static T createProxy(Class<T> anInterface); }
JsonUtils { @SuppressWarnings({"unchecked"}) public static <T> T createProxy(Class<T> anInterface) { if (anInterface == null) { throw new IllegalArgumentException(); } if (anInterface.isInterface()) { return (T)Proxy.newProxyInstance(anInterface.getClassLoader(), new Class[]{anInterface}, new ProxyObject(anInterface)); } throw new IllegalArgumentException(String.format("Type '%s' is not interface. ", anInterface.getSimpleName())); } private  JsonUtils(); static String getJsonString(String string); static boolean isKnownType(Class<?> clazz); static Types getType(Object o); static Types getType(Class<?> clazz); static Set<String> getTransientFields(Class<?> aClass); @SuppressWarnings({"unchecked"}) static T createProxy(Class<T> anInterface);  }