J
JavaEnquirer
Anyone know how I go about getting the class of a generic type e.g. I'd
like to be able to do the following:
Class clazz = T.getClass();
Seems a strange request, but without going into detail, I need to be
able to do this. I don't have access to an instance of type T and do
not want to pass an instance in either. In fact, I need to create an
instance of type T inside of a class paramaterised with type T.
many thanks in advance.
like to be able to do the following:
Class clazz = T.getClass();
Seems a strange request, but without going into detail, I need to be
able to do this. I don't have access to an instance of type T and do
not want to pass an instance in either. In fact, I need to create an
instance of type T inside of a class paramaterised with type T.
many thanks in advance.