MCPcopy Create free account
hub / github.com/google/guice / requireBinding

Method requireBinding

core/src/com/google/inject/AbstractModule.java:163–165  ·  view source on GitHub ↗

Adds a dependency from this module to key. When the injector is created, Guice will report an error if key cannot be injected. Note that this requirement may be satisfied by implicit binding, such as a public no-arguments constructor. @since 2.0

(Key<?> key)

Source from the content-addressed store, hash-verified

161 * @since 2.0
162 */
163 protected void requireBinding(Key<?> key) {
164 binder().getProvider(key);
165 }
166
167 /**
168 * Adds a dependency from this module to {@code type}. When the injector is created, Guice will

Callers

nothing calls this directly

Calls 2

binderMethod · 0.95
getProviderMethod · 0.65

Tested by

no test coverage detected