Silk DI 0.6


se.jbee.inject.bind
Class BinderModuleWith<T>

Object
  extended by se.jbee.inject.bind.Binder
      extended by se.jbee.inject.bind.Binder.TargetedBinder
          extended by se.jbee.inject.bind.Binder.ScopedBinder
              extended by se.jbee.inject.bind.Binder.RootBinder
                  extended by se.jbee.inject.bind.InitializedBinder
                      extended by se.jbee.inject.bind.BinderModuleWith<T>
All Implemented Interfaces:
Bundle, PresetModule<T>

public abstract class BinderModuleWith<T>
extends InitializedBinder
implements Bundle, PresetModule<T>

The default utility PresetModule. A BinderModuleWith is also a Bundle so it should be used and installed as such. It will than Bundle.bootstrap(Bootstrapper) itself as a module.

Author:
Jan Bernitt (jan@jbee.se)

Nested Class Summary
 
Nested classes/interfaces inherited from class se.jbee.inject.bind.Binder
Binder.ConfigBinder<T>, Binder.InspectBinder, Binder.RootBinder, Binder.ScopedBinder, Binder.TargetedBinder, Binder.TypedBinder<T>, Binder.TypedElementBinder<E>
 
Field Summary
 
Fields inherited from class se.jbee.inject.bind.Binder
root
 
Constructor Summary
BinderModuleWith()
           
 
Method Summary
 void bootstrap(Bootstrapper bootstrap)
           
 void declare(Bindings bindings, T preset)
           
protected abstract  void declare(T preset)
           
 String toString()
           
 
Methods inherited from class se.jbee.inject.bind.InitializedBinder
bind, init
 
Methods inherited from class se.jbee.inject.bind.Binder.RootBinder
asDefault, on, per, provide, require, require
 
Methods inherited from class se.jbee.inject.bind.Binder.ScopedBinder
bind, injectingInto, injectingInto, injectingInto, injectingInto, injectingInto
 
Methods inherited from class se.jbee.inject.bind.Binder.TargetedBinder
in, inPackageAndSubPackagesOf, inPackageOf, inSubPackagesOf, within, within, within, within, within
 
Methods inherited from class se.jbee.inject.bind.Binder
arraybind, autobind, autobind, bind, bind, bind, bind, bind, configbind, configbind, construct, construct, construct, create, implicit, implicitBindToConstructor, implicitBindToConstructor, multibind, multibind, multibind, multibind, multibind, starbind, with
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BinderModuleWith

public BinderModuleWith()
Method Detail

bootstrap

public final void bootstrap(Bootstrapper bootstrap)
Specified by:
bootstrap in interface Bundle
Parameters:
bootstrap - The Bootstrapper this Bundle should install itself to.

declare

public final void declare(Bindings bindings,
                          T preset)
Specified by:
declare in interface PresetModule<T>
Parameters:
bindings - use to declare made bound within this Module.
preset - The preset value (chosen by the value's type from the set of all preset values). This can very well be null in case no such type value has been preset.

toString

public String toString()
Overrides:
toString in class Object

declare

protected abstract void declare(T preset)
Parameters:
preset - The value contained in the Presets for the type of this PresetModule.
See Also:
PresetModule.declare(Bindings, Object)

Silk DI 0.6