Hi:
public interface MyInterface<T> {
// ....
}
public class Impl implements<String> {
// ....
Type genericInterface = Impl.class.getGenericInterfaces()[0];
if (genericInterface instanceof Class) {
throw new RuntimeException();
}
ParameterizedType pt = (ParameterizedType) genericInterface;
Type typeArg = pt.getActualTypeArguments()[0];
Class<?> cls = (Class<?>) typeArg;
}
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---