I have a method which returns a generic type, is there a way to retrieve the value of <T>
without having to give this by parameters?
public <T> T getObject(String location, String method)
{
// ! Here I want to retrieve the class of T
Class<?> requestedClass = getMeTheClassThatWasRequested();
return requestedClass;
}
Is there any way to do this?