Class NamedConfigParametersModule

java.lang.Object
com.google.inject.AbstractModule
com.github.joschi.jadconfig.guice.NamedConfigParametersModule
All Implemented Interfaces:
com.google.inject.Module

public class NamedConfigParametersModule extends com.google.inject.AbstractModule
A Guice module which registers all fields of the provided objects annotated with Parameter as named bindings and optionally also adds bindings of the object instances themselves.
See Also:
  • Named
  • Constructor Details

    • NamedConfigParametersModule

      public NamedConfigParametersModule(Collection beans, boolean registerBeans)
      Create a new NamedConfigParametersModule instance.
      Parameters:
      beans - A Collection containing all instances of the configuration beans which should be registered.
      registerBeans - If true, the module will add bindings for the instances in beans.
    • NamedConfigParametersModule

      public NamedConfigParametersModule(Collection beans)
      Create a new NamedConfigParametersModule instance and add bindings for the instances in beans.
      Parameters:
      beans - A Collection containing all instances of the configuration beans which should be registered.