public static IObservableValue observeDetailValue(Realm realm,
IObservableValue master, Class masterType, String propertyName,
Class propertyType) {
warnIfDifferentRealms(realm, master.getRealm());
Assert.isNotNull(masterType, "masterType cannot be null"); //$NON-NLS-1$
IObservableValue value = MasterDetailObservables.detailValue(master,
BeanProperties.value(masterType, propertyName, propertyType)
.valueFactory(realm), propertyType);
return new BeanObservableValueDecorator(value, BeanPropertyHelper
.getPropertyDescriptor(masterType, propertyName));
}