public final class InjectorLookup
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static void |
clear()
Clears stored injectors references.
|
static com.google.common.base.Optional<com.google.inject.Injector> |
getInjector(io.dropwizard.Application application) |
static io.dropwizard.lifecycle.Managed |
registerInjector(io.dropwizard.Application application,
com.google.inject.Injector injector)
Used internally to register application specific injector.
|
public static io.dropwizard.lifecycle.Managed registerInjector(io.dropwizard.Application application, com.google.inject.Injector injector)
application
- application instanceinjector
- injector instancepublic static com.google.common.base.Optional<com.google.inject.Injector> getInjector(io.dropwizard.Application application)
application
- application instancepublic static void clear()
WARNING: calling this method while application is working may cause incorrect behaviour.