Scala Universe
A structured view of classes at runtime. Types are resolved once, generics are bound to the concrete subclass, and fields, methods and annotations share one model.
Installation
One artifact for the JVM. It brings Guava's TypeToken for generic resolution and the CDI API for the optional class path extension.
The generic type Java forgets
The field is declared as List[E] in the base class. Resolved through the subclass, it is a List[User].
One model per type
TypeResolver turns any java.lang.reflect.Type into a cached ResolvedClass: raw class, type arguments and hierarchy.
Generics seen from the subclass
Field types, return types and parameter types of inherited members are resolved against the type you started from.
Properties instead of members
Bean and annotation introspectors join field, getter and setter into one property with the annotations of all three.
The type layer of json-mapper
json-mapper resolves every class through TypeResolver, reads @JsonbProperty members through AnnotationIntrospector and finds schemas through companionInstance. Anything that builds a framework on plain classes can do the same.
From a type to its properties
The type pages build the model, the member pages show what is in it, the introspection pages turn it into properties, and the practice pages put it to work.