Interface Module

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface Module
A reusable unit of binding configuration. Modules can be installed into a Binder (and therefore into any Context) via Binder.install(Module) or InjectionFramework.newContext(Module...).

Modules are composable: install multiple modules to combine their bindings. Use Modules.override(Module, Module) to compose two modules where one overrides conflicting bindings from the other.

Since:
Apr-2026
Author:
reed.vonredwitz
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    configure(Binder binder)
    Contributes bindings to the given Binder.
  • Method Details

    • configure

      void configure(Binder binder)
      Contributes bindings to the given Binder.
      Parameters:
      binder - the Binder to configure