When I have an interface
public interface Foo { T someMethod(); }
is there any way to assure that when some class implements t
This cannot be done because of Type Erasure.
EDIT :
I got down voted, here is more explanation :
public interface Foo;
T from above is available in run time, so it cannot be checked. However, one could custom annotation that could enforce this.
T