Class DefaultBundleLookup

java.lang.Object
ru.vyarus.dropwizard.guice.bundle.DefaultBundleLookup
All Implemented Interfaces:
GuiceyBundleLookup

public class DefaultBundleLookup extends 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:

Any simple lookup may be registered directly in builder instead of default lookup (the same contract).

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 Details

    • DefaultBundleLookup

      public DefaultBundleLookup()
      Use predefined lookups.
    • DefaultBundleLookup

      public DefaultBundleLookup(GuiceyBundleLookup... lookups)
      Parameters:
      lookups - lookups to use instead of defaults
  • Method Details

    • lookup

      public 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 interface GuiceyBundleLookup
      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