ddi
Made in the European Union

Documentation

Reference documentation for DDI – Dynamic Dependency Injection. Bootstrap, resolution rules, ClassResolver, Producers, scopes, compatibility.

DDI is a nano dependency-injection library for Core Java. Its defining feature is runtime resolution: a ClassResolver is invoked on every @Inject lookup and decides — in plain Java — which implementation to inject.

Start here if you’re new:

  • Getting Started — Maven coordinates, your first @Inject, the three lines that bootstrap the container.
  • Resolution Rules — the complete decision table: what happens for N implementations, M producers, with or without resolvers.
  • ClassResolver — the dynamic part. How to write a resolver that picks an implementation per call.
  • Producers@Produces and Producer<T> for instances that need a factory.
  • Scopes — lifecycle management and the built-in JVMSingletonInjectionScope.
  • Compatibility — JDK matrix and supported runtimes.

Looking for tasks instead of reference? See the Tutorials — recipes for pricing-tier routing, quota-aware degradation, role-based impl selection, feature flags, multi-tenancy and mocking.