public class PropertyBundleLookup extends java.lang.Object implements GuiceyBundleLookup
Example: -Dguicey.bundles=com.foo.MyBundle1,com.foo.MyBundle2.
Static shortcut method may be used to set property value from code (for example, in unit tests to enable
specific debug bundle): PropertyBundleLookup.enableBundles(MyBundle1.class, MyBundle2.class).
For example, last approach is used in guicey tests to enable
HK2DebugBundle to check beans boundaries during tests.
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
BUNDLES_PROPERTY |
| Constructor and Description |
|---|
PropertyBundleLookup() |
| Modifier and Type | Method and Description |
|---|---|
static void |
enableBundles(java.lang.Class<? extends GuiceyBundle>... bundles)
Sets system property value to provided classes.
|
java.util.List<GuiceyBundle> |
lookup()
Called before guice injector creation to lookup additional bundles (in dropwizard run phase).
|
public static final java.lang.String BUNDLES_PROPERTY
public java.util.List<GuiceyBundle> lookup()
GuiceyBundleLookuplookup in interface GuiceyBundleLookup@SafeVarargs public static void enableBundles(java.lang.Class<? extends GuiceyBundle>... bundles)
bundles - bundles to enable