Hot to cast using Class returnType obtained through reflection?
I am using reflection to get return type of method which is String.
When I invoke function I need to cast return value to String.
How can I do that without explicitly using String and instead to use returnType obtained through reflection?