jOOR - Fluent Reflection in Java jOOR is a very simple fluent API that gives access to your Java Class structures in a more intuitive way. The JDK's reflection APIs are hard and verbose to use. Other languages have much simpler constructs to access type meta information at runtime. Let us make Java reflection better.
The Reflect.wrapper(Class<?>) method could be generic:
public static <T> Class<T> wrapper(Class<T> type)
The method either returns the argument itself, if it is already a reference type, or it turns int.class into Integer.class. But both of these class literals have the same type:
The
Reflect.wrapper(Class<?>)
method could be generic:The method either returns the argument itself, if it is already a reference type, or it turns
int.class
intoInteger.class
. But both of these class literals have the same type:So, we can guarantee that the
<T>
type is maintained in this method.