I know that I can do this:
Class<T> type = (Class<T>) ((ParameterizedType) getClass().getGenericSuperclass()).getActualTypeArguments()[0];
But how can I create a class based on this new type?
Class<MyObject<T>> type = ???;
thanks
I know that I can do this:
Class<T> type = (Class<T>) ((ParameterizedType) getClass().getGenericSuperclass()).getActualTypeArguments()[0];
But how can I create a class based on this new type?
Class<MyObject<T>> type = ???;
thanks
Class<MyObject<T>> type = (Class<MyObject<T>>)(Class<?>)MyObject.class;