Multibindings: How to Build a Plugin System Without a Registry
Using the guice multibinder, MapBinder, and OptionalBinder so many modules can contribute to one Set, Map, or Optional — multibindings explained with Kotlin and Java side by side.
Advanced Guice: multibindings, generics, assisted injection, AOP, private modules, custom scopes, the servlet extension, and testing.
Using the guice multibinder, MapBinder, and OptionalBinder so many modules can contribute to one Set, Map, or Optional — multibindings explained with Kotlin and Java side by side.
How Guice TypeLiteral captures full generic types so you can bind and inject things like Repository<User>, with Kotlin and Java side by side — beating type erasure at its own game.
How guice assisted injection and @Assisted let Guice supply the dependencies while the caller supplies the runtime values — building objects that need both, in Kotlin and Java.
A practical guide to guice aop — using a method interceptor to add timing, logging, and transactions cross-cuttingly, with the limitations laid bare, in Kotlin and Java.
How guice private modules encapsulate bindings so internal wiring never leaks into the global graph — and how to run two isolated copies of a subsystem, in Kotlin and Java.
How to write a guice custom scope by implementing the Scope interface — a ThreadLocal-backed scope with enter/exit, a scope annotation, and bindScope — with Kotlin and Java side by side.
How the guice servlet extension wires servlets, filters, and the @RequestScoped / @SessionScoped scopes onto a classic web stack — and when it's still the right tool — with Kotlin and Java side by side.
Guice testing without the container, swapping fakes with Modules.override and BoundFieldModule, Kotlin idioms, the Jakarta migration, and guice best practices — in Kotlin and Java.