12
This cannot be done because of Type Erasure.
EDIT :
I got down voted, here is more explanation :
public interface Foo<T>;
T from above is available in run time, so it cannot be checked. However, one could custom annotation that could enforce this.