ApplicationIllegalArgumentException.valid(expected == null || expected.isAssignableFrom(flowPropertyProvider.getClass()),
this,": expected a ", expected, " but got a ", flowPropertyProvider.getClass());
try {
value = propertyValueProvider.get(flowPropertyProvider, this);
} catch(Exception e) {
throw new ApplicationIllegalStateException(this+": PropertyValueProvider threw an exception. propertyValueProvider="+propertyValueProvider, e);
}
} else {
// TODO -- may still want to call this if flowPropertyValueProvider returns null.
// for example the property type is a primitive.
value = this.getDataClassDefinition().getFlowTranslator().getDefaultObject(flowPropertyProvider);