MCPcopy Index your code
hub / github.com/google/guice / getInstance

Method getInstance

core/src/com/google/inject/Injector.java:190–190  ·  view source on GitHub ↗

Returns the appropriate instance for the given injection key; equivalent to getProvider(key).get(). When feasible, avoid using this method, in favor of having Guice inject your dependencies ahead of time. @throws ConfigurationException if this injector cannot find or create the provider. @t

(Key<T> key)

Source from the content-addressed store, hash-verified

188 * @throws ProvisionException if there was a runtime failure while providing an instance.
189 */
190 <T> T getInstance(Key<T> key);
191
192 /**
193 * Returns the appropriate instance for the given injection type; equivalent to {@code

Callers 15

testPackageVisibilityMethod · 0.95
testEnhancerNamingMethod · 0.95
testInjectMethod · 0.95
testQualifiedInjectMethod · 0.95
testProviderInjectMethod · 0.95
testScopeAnnotationMethod · 0.95
testSingletonMethod · 0.95
startMethod · 0.95

Implementers 2

InjectorImplcore/src/com/google/inject/internal/In
ToolStageInjectorcore/src/com/google/inject/internal/In

Calls

no outgoing calls

Tested by 15

testPackageVisibilityMethod · 0.76
testEnhancerNamingMethod · 0.76
testInjectMethod · 0.76
testQualifiedInjectMethod · 0.76
testProviderInjectMethod · 0.76
testScopeAnnotationMethod · 0.76
testSingletonMethod · 0.76
startMethod · 0.76