org.qi4j.api.value
Interface ValueBuilderFactory


public interface ValueBuilderFactory

Factory for Values and ValueBuilders.


Method Summary
<T> T
newValue(Class<T> valueType)
          Instantiate a Value of the given type.
<T> ValueBuilder<T>
newValueBuilder(Class<T> valueType)
          Create a builder for creating new Values that implements the given Value type.
<T> T
newValueFromJSON(Class<T> valueType, String jsonValue)
           
 

Method Detail

newValueBuilder

<T> ValueBuilder<T> newValueBuilder(Class<T> valueType)
                                throws NoSuchValueException
Create a builder for creating new Values that implements the given Value type.

Parameters:
valueType - an interface that describes the Composite to be instantiated
Returns:
a ValueBuilder for creation of ValueComposites implementing the interface
Throws:
NoSuchValueException - if no value extending the mixinType has been registered

newValue

<T> T newValue(Class<T> valueType)
           throws NoSuchValueException,
                  ConstructionException
Instantiate a Value of the given type.

Parameters:
valueType - the Value type to instantiate
Returns:
a new Value instance
Throws:
NoSuchValueException - if no value extending the mixinType has been registered
ConstructionException - if the value could not be instantiated

newValueFromJSON

<T> T newValueFromJSON(Class<T> valueType,
                       String jsonValue)