A small library of building blocks for type-safe generic programming in Java. Born out of the realisation that most “generic” Java code drops to Object and casts back — and that this is largely fixable by leaning harder on the type system rather than around it.

What’s in the box

  • Type witnesses for runtime generic introspection (working around erasure)
  • Builder patterns that retain compile-time type information
  • Composition helpers for functions, predicates and consumers
  • Result / Either style utilities that compose with Optional and CompletableFuture

When it helps

  • Library code that needs to expose generic APIs without forcing callers to cast
  • Domain models where a Map<String, Object> would technically work but losing type info costs maintainability
  • Glue code between strongly-typed Java and weakly-typed external sources (JSON, configs)

Documentation, releases and discussion live on GitHub.