public Interface Foo{...}
Is there a way to retrieve which T was given for an implementation of Foo?
For example,>
There's. Look at [Javadoc for java.lang.Class#getGenericInterfaces()](http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Class.html#getGenericInterfaces()).
Like this:
public class Test1 {
interface GenericOne {
}
public class Impl implements GenericOne {
}
public static void main(String[] argv) {
Class c = (Class) ((ParameterizedType) Impl.class.getGenericInterfaces()[0]).getActualTypeArguments()[0];
System.out.println(c);
}
}