public class HK2DebugBundle extends java.lang.Object implements GuiceyBundle
HK2Managed
annotated service must be
instantiated by HK2 and not guiceWhen enabled, exception will be thrown when service instantiated outside of assumed bound (or duplicate instantiation occur).
Checked only beans registered by JerseyInstaller
(ResourceInstaller
,
JerseyProviderInstaller
or any 3rd party
installer implementing jersey installer interface).
Module intended to be used in tests.
ContextDebugService
collects all tracked classes
instantiated by both guice and HK2 and may provide lists of classes accordingly. It may be used in test conditions.
Modifier and Type | Class and Description |
---|---|
static class |
HK2DebugBundle.HK2DebugModule
Guice module with scope validation services.
|
Constructor and Description |
---|
HK2DebugBundle() |
Modifier and Type | Method and Description |
---|---|
void |
initialize(GuiceyBootstrap bootstrap)
Called in run phase.
|
public void initialize(GuiceyBootstrap bootstrap)
GuiceyBundle
GuiceyBootstrap
contains almost the same methods as
GuiceBundle.Builder
, which allows to register installers, extensions
and guice modules. Existing installer could be replaced by disabling old one and registering new.
WARNING: don't assume that this method will be called before or after dropwizard bundle run method (both possible). If configuration or environment objects required, they may be obtained from bootstrap.
initialize
in interface GuiceyBundle
bootstrap
- guicey bootstrap object