Describe types in Java.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.gitignore
LICENSE
README.md
pom.xml

README.md

Jype

Jype is a library for manually describing Java types in a robust manner. java.lang.Class is sufficient for describing a simple, non-generic type. Once we start using generics, type erasure prevents us from easily understanding a type at runtime.

Enter Jype. If manually describing a type is within the constraints of your project, Jype is there to help:

// String
TypeDescriptor simpleType = new SimpleType(String.class);

// Map<String, Integer>
TypeDescriptor genericType = new GenericType(Map.class, String.class, Integer.class);

// List<List<String>>
TypeDescriptor genericType = new GenericType(List.class, new GenericType(List.class, String.class));

License

Distributed under the MIT license