You may use Class<?> as an argument. You even may use a Class<T> in some cases. For example you may have following method:
In this method you must put instances of class T into a resulting list. If all added elements are compatible to a type T then all will work fine. But you can't check that object is an instance of T if T is generic type. For example, compiler won't help you to ensure safety in a following code (you will be able to add
String to a list, for example):
I don't see how much genericity you need in your example. If you always use only concrete types with "plain" object fields (i.e. fields have no generic type) you original approach may be fine. But I suggest something like
Inside a method you may use type parameter <T>. Just remember, that if T is generic, it can't be checked using reflection and type mismatch will result in classCastExceptions in other places, not an acutal reflection code. So, following code should be fine (not tried to compile):
It is a good approach to try to do thing as safe as possible. But you will need a "class" object and it will still have some limitations. And if you have no class instance you may try to use an unchecked conversion. Or it may be better to return Class<?>/Object instance and let a user to cast it to a proper instance (but due to an erased types he won't be able to check if List is a List<Integer> or a List<String>).
I don't yet understand what exactly you are trying to do. But I hope this examples will guide you insights to your problem.