Finding Generic Types with Java Reflection

Sometimes you need to access type information as Java programs execute. Accessing a field’s type, for instance, is necessary to invoke a setter or getter for that field at run time. And obtaining types for a method’s parameters and return value let you invoke that method “on-the-fly” when needed. In this post, I show you […]