| Modifier and Type | Method and Description |
|---|---|
<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> ValueBuilder<T> |
newValueBuilderWithPrototype(T prototype)
Create a builder for creating a new Value starting with the given prototype.
|
<T> ValueBuilder<T> |
newValueBuilderWithState(Class<T> mixinType,
Function<PropertyDescriptor,Object> propertyFunction,
Function<AssociationDescriptor,EntityReference> associationFunction,
Function<AssociationDescriptor,Stream<EntityReference>> manyAssociationFunction,
Function<AssociationDescriptor,Stream<Map.Entry<String,EntityReference>>> namedAssociationFunction)
Create a builder for creating a new Value starting with the given state.
|
<T> T |
newValueFromSerializedState(Class<T> valueType,
String serializedState)
Instantiate a Value of the given type using the serialized state given as String.
|
<T> T newValue(Class<T> valueType) throws NoSuchValueTypeException, ConstructionException
T - Value typevalueType - the Value type to instantiateNoSuchValueTypeException - if no value extending the mixinType has been registeredConstructionException - if the value could not be instantiated<T> ValueBuilder<T> newValueBuilder(Class<T> valueType) throws NoSuchValueTypeException
The returned ValueBuilder can be reused to create several Values instances.
T - Value typevalueType - an interface that describes the Composite to be instantiatedNoSuchValueTypeException - if no value extending the mixinType has been registered<T> ValueBuilder<T> newValueBuilderWithPrototype(T prototype)
The returned ValueBuilder can only be used ONCE.
T - Value typeprototype - a prototype the builder will useNoSuchValueTypeException - if no value extending the mixinType has been registered<T> ValueBuilder<T> newValueBuilderWithState(Class<T> mixinType, Function<PropertyDescriptor,Object> propertyFunction, Function<AssociationDescriptor,EntityReference> associationFunction, Function<AssociationDescriptor,Stream<EntityReference>> manyAssociationFunction, Function<AssociationDescriptor,Stream<Map.Entry<String,EntityReference>>> namedAssociationFunction)
The returned ValueBuilder can only be used ONCE.
T - Value typemixinType - 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 associationsnamedAssociationFunction - a function providing the state of named associationsNoSuchValueTypeException - if no value extending the mixinType has been registered<T> T newValueFromSerializedState(Class<T> valueType, String serializedState)
T - Value typevalueType - the Value type to instantiateserializedState - the state of the ValueNoSuchValueTypeException - if no value extending the mixinType has been registeredConstructionException - if the value could not be instantiated