Binding in Guice

In the previous topic, we became acquainted with the binding process and its importance in Guice DI. Each binding call to the bind() method is type-checked, so the compiler can report mistakes in case you utilize off-base types.

Guice provides different types of binding techniques which can be used in modules. The types of binding available are: linked bindings, instance bindings; untargeted bindings. Constructor bindings, built-in bindings, Just-in-time bindings. and provider bindings.

Get Java 9 Dependency Injection now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.