Represents a unit of configuration of the Bootique DI container.
| 25 | * Represents a unit of configuration of the Bootique DI container. |
| 26 | */ |
| 27 | @FunctionalInterface |
| 28 | public interface BQModule { |
| 29 | |
| 30 | /** |
| 31 | * Returns a "crate" wrapping this module. The returned crate is used by Bootique to bootstrap the module within the |
| 32 | * runtime. To supply extra module metadata, modules should override the default implementation using the builder |
| 33 | * provided by {@link ModuleCrate#of(BQModule)}. |
| 34 | * |
| 35 | * @see ModuleCrate#of(BQModule) |
| 36 | * @since 3.0 |
| 37 | */ |
| 38 | default ModuleCrate crate() { |
| 39 | return ModuleCrate.of(this).build(); |
| 40 | } |
| 41 | |
| 42 | /** |
| 43 | * A callback method invoked during injector assembly that allows the module to load its services. |
| 44 | * |
| 45 | * @param binder a binder object passed by the injector assembly environment. |
| 46 | */ |
| 47 | void configure(Binder binder); |
| 48 | } |
no outgoing calls
no test coverage detected