use of org.qi4j.runtime.composite.MixinModel in project qi4j-sdk by Qi4j.
the class ValueModel method newValueInstance.
public ValueInstance newValueInstance(ModuleInstance moduleInstance, ValueStateInstance state) {
Object[] mixins = mixinsModel.newMixinHolder();
ValueInstance instance = new ValueInstance(this, moduleInstance, mixins, state);
// Instantiate all mixins
int i = 0;
InjectionContext injectionContext = new InjectionContext(instance, UsesInstance.EMPTY_USES, state);
for (MixinModel mixinModel : mixinsModel.mixinModels()) {
mixins[i++] = mixinModel.newInstance(injectionContext);
}
// Return
return instance;
}
Aggregations