Silk DI 0.6


se.jbee.inject.bootstrap
Class Configuring<T>

Object
  extended by se.jbee.inject.bootstrap.Configuring<T>
Type Parameters:
T - The type of the value that controlls the configuration
All Implemented Interfaces:
Naming<T>

public final class Configuring<T>
extends Object
implements Naming<T>

A Configuring value describes a value (bound within an Injector) that is used to control configuration dependent implementation/injection (CDI). When CDI is used a type is resolved to different named instances dependent on the Configuring value. To derive the name a actual value is associated with a Naming strategy is specified together with the Instance of the controlling value.

Author:
Jan Bernitt (jan@jbee.se)

Field Summary
static Naming<Enum<?>> ENUM
           
static Naming<? super Object> TO_STRING
           
 
Method Summary
static
<T extends Enum<?>>
Configuring<T>
configuring(Instance<T> value)
           
static
<T> Configuring<T>
configuring(Naming<? super T> naming, Instance<T> value)
           
 Instance<T> getInstance()
           
 Name name(T value)
          Note: Dependent on the usage it should be considered to use Name.namedInternal(String) to derive the names whenever there is a chance that the name might collide with a user defined one.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ENUM

public static final Naming<Enum<?>> ENUM

TO_STRING

public static final Naming<? super Object> TO_STRING
Method Detail

configuring

public static <T extends Enum<?>> Configuring<T> configuring(Instance<T> value)

configuring

public static <T> Configuring<T> configuring(Naming<? super T> naming,
                                             Instance<T> value)

getInstance

public Instance<T> getInstance()

name

public Name name(T value)
Description copied from interface: Naming
Note: Dependent on the usage it should be considered to use Name.namedInternal(String) to derive the names whenever there is a chance that the name might collide with a user defined one.

Specified by:
name in interface Naming<T>
Parameters:
value - null is allowed
Returns:
A Name derived from the value passed

Silk DI 0.6