I have an interface with default methods only.
interface Some {
default void doSome() {
}
}
And I'm creating some sort of proxy instance from it.
(Some) getProxy(new Class<?>[]{Some.class}, new Some() {});
Now I want some utility method of doing it for any interface.
Is there any nice way to do that?
<T> T static proxy(final Class<T> clazz) {
// @@? How can I do `new T(){}` from the class?
}