|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ValueBuilderFactory
Factory for Values and ValueBuilders.
Method Summary | ||
---|---|---|
|
newValue(java.lang.Class<T> valueType)
Instantiate a Value of the given type. |
|
|
newValueBuilder(java.lang.Class<T> valueType)
Create a builder for creating new Values that implements the given Value type. |
|
|
newValueBuilderWithPrototype(T prototype)
Create a builder for creating a new Value starting with the given prototype. |
|
|
newValueBuilderWithState(java.lang.Class<T> mixinType,
Function<PropertyDescriptor,java.lang.Object> propertyFunction,
Function<AssociationDescriptor,EntityReference> associationFunction,
Function<AssociationDescriptor,java.lang.Iterable<EntityReference>> manyAssociationFunction)
Create a builder for creating a new Value starting with the given state. |
|
|
newValueFromSerializedState(java.lang.Class<T> valueType,
java.lang.String serializedState)
Instantiate a Value of the given type using the serialized state given as String. |
Method Detail |
---|
<T> T newValue(java.lang.Class<T> valueType) throws NoSuchValueException, ConstructionException
valueType
- the Value type to instantiate
NoSuchValueException
- if no value extending the mixinType has been registered
ConstructionException
- if the value could not be instantiated<T> ValueBuilder<T> newValueBuilder(java.lang.Class<T> valueType) throws NoSuchValueException
The returned ValueBuilder can be reused to create several Values instances.
valueType
- an interface that describes the Composite to be instantiated
NoSuchValueException
- if no value extending the mixinType has been registered<T> ValueBuilder<T> newValueBuilderWithPrototype(T prototype)
The returned ValueBuilder can only be used ONCE.
prototype
- a prototype the builder will use
NoSuchValueException
- if no value extending the mixinType has been registered<T> ValueBuilder<T> newValueBuilderWithState(java.lang.Class<T> mixinType, Function<PropertyDescriptor,java.lang.Object> propertyFunction, Function<AssociationDescriptor,EntityReference> associationFunction, Function<AssociationDescriptor,java.lang.Iterable<EntityReference>> manyAssociationFunction)
The returned ValueBuilder can only be used ONCE.
mixinType
- an interface that describes the Composite to be instantiatedpropertyFunction
- a function providing the state of propertiesassociationFunction
- a function providing the state of associationsmanyAssociationFunction
- a function providing the state of many associations
NoSuchValueException
- if no value extending the mixinType has been registered<T> T newValueFromSerializedState(java.lang.Class<T> valueType, java.lang.String serializedState)
valueType
- the Value type to instantiateserializedState
- the state of the Value
NoSuchValueException
- if no value extending the mixinType has been registered
ConstructionException
- if the value could not be instantiated
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |