Class DefaultBundleLookup
- java.lang.Object
-
- ru.vyarus.dropwizard.guice.bundle.DefaultBundleLookup
-
- All Implemented Interfaces:
GuiceyBundleLookup
public class DefaultBundleLookup extends java.lang.Object implements GuiceyBundleLookup
Default implementation of bundles lookup mechanism. Did not implement lookup logic but compose more simple lookups. Additionally, logs all resolved bundles.By default includes:
PropertyBundleLookup
to use system propertyServiceLoaderBundleLookup
to load bundles usingServiceLoader
byGuiceyBundle
Additional lookups could be added using
addLookup(GuiceyBundleLookup)
method. Default lookup implementation could be customized by calling constructor with custom loaders list.- Since:
- 15.01.2016
-
-
Constructor Summary
Constructors Constructor Description DefaultBundleLookup()
Use predefined lookups.DefaultBundleLookup(GuiceyBundleLookup... lookups)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DefaultBundleLookup
addLookup(GuiceyBundleLookup lookup)
Add additional lookup mechanism.java.util.List<GuiceyBundle>
lookup()
Called before guice injector creation to lookup additional bundles (in dropwizard run phase).
-
-
-
Constructor Detail
-
DefaultBundleLookup
public DefaultBundleLookup()
Use predefined lookups.
-
DefaultBundleLookup
public DefaultBundleLookup(GuiceyBundleLookup... lookups)
- Parameters:
lookups
- lookups to use instead of defaults
-
-
Method Detail
-
lookup
public java.util.List<GuiceyBundle> lookup()
Description copied from interface:GuiceyBundleLookup
Called before guice injector creation to lookup additional bundles (in dropwizard run phase).- Specified by:
lookup
in interfaceGuiceyBundleLookup
- Returns:
- list of found bundles or empty list
-
addLookup
public DefaultBundleLookup addLookup(GuiceyBundleLookup lookup)
Add additional lookup mechanism.- Parameters:
lookup
- lookup implementation- Returns:
- default lookup instance for chained calls
-
-