use of org.qi4j.runtime.value.ValueBuilderInstance in project qi4j-sdk by Qi4j.
the class ModuleInstance method newValueBuilder.
@Override
public <T> ValueBuilder<T> newValueBuilder(Class<T> mixinType) throws NoSuchValueException {
NullArgumentException.validateNotNull("mixinType", mixinType);
ModelModule<ValueModel> compositeModelModule = typeLookup.lookupValueModel(mixinType);
if (compositeModelModule == null) {
throw new NoSuchValueException(mixinType.getName(), name());
}
StateResolver stateResolver = new InitialStateResolver(compositeModelModule.module());
return new ValueBuilderInstance<>(compositeModelModule, this, stateResolver);
}
Aggregations