@Test public void testSetComplexProperty() { Door door = new Door(); setter.setComplexProperty("door", door); assertEquals(door, house.getDoor()); }
public void setComplexProperty(String name, Object complexProperty) { String dName = Introspector.decapitalize(name); PropertyDescriptor propertyDescriptor = getPropertyDescriptor(dName); if (propertyDescriptor == null) { addWarn("Could not find PropertyDescriptor for [" + name + "] in " + objClass.getName()); return; } Method setter = propertyDescriptor.getWriteMethod(); if (setter == null) { addWarn("Not setter method for property [" + name + "] in " + obj.getClass().getName()); return; } Class<?>[] paramTypes = setter.getParameterTypes(); if (!isSanityCheckSuccessful(name, setter, paramTypes, complexProperty)) { return; } try { invokeMethodWithSingleParameterOnThisObject(setter, complexProperty); } catch (Exception e) { addError("Could not set component " + obj + " for parent component " + obj, e); } }
PropertySetter extends ContextAwareBase { public void setComplexProperty(String name, Object complexProperty) { String dName = Introspector.decapitalize(name); PropertyDescriptor propertyDescriptor = getPropertyDescriptor(dName); if (propertyDescriptor == null) { addWarn("Could not find PropertyDescriptor for [" + name + "] in " + objClass.getName()); return; } Method setter = propertyDescriptor.getWriteMethod(); if (setter == null) { addWarn("Not setter method for property [" + name + "] in " + obj.getClass().getName()); return; } Class<?>[] paramTypes = setter.getParameterTypes(); if (!isSanityCheckSuccessful(name, setter, paramTypes, complexProperty)) { return; } try { invokeMethodWithSingleParameterOnThisObject(setter, complexProperty); } catch (Exception e) { addError("Could not set component " + obj + " for parent component " + obj, e); } } }
PropertySetter extends ContextAwareBase { public void setComplexProperty(String name, Object complexProperty) { String dName = Introspector.decapitalize(name); PropertyDescriptor propertyDescriptor = getPropertyDescriptor(dName); if (propertyDescriptor == null) { addWarn("Could not find PropertyDescriptor for [" + name + "] in " + objClass.getName()); return; } Method setter = propertyDescriptor.getWriteMethod(); if (setter == null) { addWarn("Not setter method for property [" + name + "] in " + obj.getClass().getName()); return; } Class<?>[] paramTypes = setter.getParameterTypes(); if (!isSanityCheckSuccessful(name, setter, paramTypes, complexProperty)) { return; } try { invokeMethodWithSingleParameterOnThisObject(setter, complexProperty); } catch (Exception e) { addError("Could not set component " + obj + " for parent component " + obj, e); } } PropertySetter(Object obj); }
PropertySetter extends ContextAwareBase { public void setComplexProperty(String name, Object complexProperty) { String dName = Introspector.decapitalize(name); PropertyDescriptor propertyDescriptor = getPropertyDescriptor(dName); if (propertyDescriptor == null) { addWarn("Could not find PropertyDescriptor for [" + name + "] in " + objClass.getName()); return; } Method setter = propertyDescriptor.getWriteMethod(); if (setter == null) { addWarn("Not setter method for property [" + name + "] in " + obj.getClass().getName()); return; } Class<?>[] paramTypes = setter.getParameterTypes(); if (!isSanityCheckSuccessful(name, setter, paramTypes, complexProperty)) { return; } try { invokeMethodWithSingleParameterOnThisObject(setter, complexProperty); } catch (Exception e) { addError("Could not set component " + obj + " for parent component " + obj, e); } } PropertySetter(Object obj); void setProperty(String name, String value); void setProperty(PropertyDescriptor prop, String name, String value); AggregationType computeAggregationType(String name); Class<?> getObjClass(); void addComplexProperty(String name, Object complexProperty); void addBasicProperty(String name, String strValue); void setComplexProperty(String name, Object complexProperty); Object getObj(); Class<?> getClassNameViaImplicitRules(String name,
      AggregationType aggregationType, DefaultNestedComponentRegistry registry); }
PropertySetter extends ContextAwareBase { public void setComplexProperty(String name, Object complexProperty) { String dName = Introspector.decapitalize(name); PropertyDescriptor propertyDescriptor = getPropertyDescriptor(dName); if (propertyDescriptor == null) { addWarn("Could not find PropertyDescriptor for [" + name + "] in " + objClass.getName()); return; } Method setter = propertyDescriptor.getWriteMethod(); if (setter == null) { addWarn("Not setter method for property [" + name + "] in " + obj.getClass().getName()); return; } Class<?>[] paramTypes = setter.getParameterTypes(); if (!isSanityCheckSuccessful(name, setter, paramTypes, complexProperty)) { return; } try { invokeMethodWithSingleParameterOnThisObject(setter, complexProperty); } catch (Exception e) { addError("Could not set component " + obj + " for parent component " + obj, e); } } PropertySetter(Object obj); void setProperty(String name, String value); void setProperty(PropertyDescriptor prop, String name, String value); AggregationType computeAggregationType(String name); Class<?> getObjClass(); void addComplexProperty(String name, Object complexProperty); void addBasicProperty(String name, String strValue); void setComplexProperty(String name, Object complexProperty); Object getObj(); Class<?> getClassNameViaImplicitRules(String name,
      AggregationType aggregationType, DefaultNestedComponentRegistry registry);  }