Skip to main content Link Menu Expand (external link) Document Search Copy Copied

Binding Dependencies to a Guice Module

Header Image

  1. Binding to a concrete implementation
    • This article covers the basics of binding a service interface to a concrete implementation using Google Guice, including creating a Guice module and using the bind() method to specify the interface and its implementation.
  2. Binding to a provider instance
    • This article covers how to bind a service interface to a provider instance in Google Guice, using the bind() method to specify the interface and its provider, in a fun and imaginative way with pirate-themed examples.
  3. Binding to a provider class
    • This article explains how to bind a service interface to a provider class with Google Guice, a lightweight dependency injection framework, in a humorous and informative manner.
  4. Binding with annotations
    • This article covers the use of annotations to specify the implementation for a particular binding in Google Guice, as well as using the bind() method with annotations to specify the interface, implementation, and annotation all in one go.

Table of contents