A small library for reflection related to generic types in Java.
Java provides some reflection for generic types. There is the java.lang.reflect.Type, implemented by Class, and with subinterfaces ParameterizedType, GenericArrayType,... These can represent complex types like List<? extends String>[].
But java does not provide anything beyond the introspection needed to get these types. There is no way to check if two types are supertypes. Or, for example, given a that implements List, get its type parameter for that interface. That's where this library comes in. It allows you to do arithmetics on Types.
- For examples on how to use this library, see ExampleUsage.
- See the API documentation
- Download Gentyref 1.0.0