コード例 #1
0
 /**
  * Feature installers registered automatically when auto scan enabled, but if you don't want to
  * use it, you can register installers manually (note: without auto scan default installers will
  * not be registered).
  *
  * <p>Also, could be used to add installers from packages not included in auto scanning.
  *
  * @param installers feature installer classes to register
  * @return configurer instance for chained calls
  */
 @SafeVarargs
 public final GuiceyBootstrap installers(final Class<? extends FeatureInstaller>... installers) {
   installerConfig.getManualFeatures().addAll(Arrays.asList(installers));
   return this;
 }
コード例 #2
0
 /**
  * Beans could be registered automatically when auto scan enabled, but if you don't want to use
  * it, you can register beans manually.
  *
  * <p>Guice injector will instantiate beans and registered installers will be used to recognize
  * and properly register provided extension beans.
  *
  * <p>Also, could be used to add beans from packages not included in auto scanning.
  *
  * <p>NOTE: startup will fail if bean not recognized by installers.
  *
  * <p>NOTE: Don't register commands here: either enable auto scan, which will install commands
  * automatically or register command directly to bootstrap object and dependencies will be
  * injected to them after injector creation.
  *
  * @param extensionClasses extension bean classes to register
  * @return configurer instance for chained calls
  */
 public GuiceyBootstrap extensions(final Class<?>... extensionClasses) {
   installerConfig.getManualBeans().addAll(Arrays.asList(extensionClasses));
   return this;
 }