Class DefaultBundleLookup
java.lang.Object
ru.vyarus.dropwizard.guice.bundle.DefaultBundleLookup
- All Implemented Interfaces:
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:
PropertyBundleLookupto use system propertyServiceLoaderBundleLookupto load bundles usingServiceLoaderbyGuiceyBundle
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 -
Method Summary
Modifier and TypeMethodDescriptionaddLookup(GuiceyBundleLookup lookup) Add additional lookup mechanism.lookup()Called before guice injector creation to lookup additional bundles (in dropwizard run phase).
-
Constructor Details
-
DefaultBundleLookup
public DefaultBundleLookup()Use predefined lookups. -
DefaultBundleLookup
- Parameters:
lookups- lookups to use instead of defaults
-
-
Method Details
-
lookup
Description copied from interface:GuiceyBundleLookupCalled before guice injector creation to lookup additional bundles (in dropwizard run phase).- Specified by:
lookupin interfaceGuiceyBundleLookup- Returns:
- list of found bundles or empty list
-
addLookup
Add additional lookup mechanism.- Parameters:
lookup- lookup implementation- Returns:
- default lookup instance for chained calls
-