I have a method that returns a generic type, is there a way to get the value <T>without having to give it by parameters?
public <T> T getObject(String location, String method)
{
Class<?> requestedClass = getMeTheClassThatWasRequested();
return requestedClass;
}
Is there any way to do this?
source
share