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

Method newModule

core/test/com/google/inject/ModulesTest.java:70–79  ·  view source on GitHub ↗
(final T toBind)

Source from the content-addressed store, hash-verified

68 }
69
70 private <T> Module newModule(final T toBind) {
71 return new AbstractModule() {
72 @Override
73 protected void configure() {
74 @SuppressWarnings("unchecked") // getClass always needs a cast
75 Class<T> tClass = (Class<T>) toBind.getClass();
76 binder().skipSources(getClass()).bind(tClass).toInstance(toBind);
77 }
78 };
79 }
80}

Callers 3

testCombineVarargsMethod · 0.95
testCombineIterableMethod · 0.95
testCombineSourcesMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected