@Override public void bind(ComponentDef componentDef, PropertyDef propertyDef, Field field, Object component) { if (propertyDef != null && propertyDef.isValueGettable()) { if (field != null) { bindManualResourceField(componentDef, propertyDef, field, component); } } else { if (propertyDef != null && field != null) { doBindResourceField(componentDef, field, component); } } }
protected void bindManualResourceField(ComponentDef componentDef, PropertyDef propertyDef, Field field, Object component) { final Object value = getValue(componentDef, propertyDef, component, field.getType()); setResourceFieldValue(componentDef, field, component, value); }
protected void bindManualProperty(ComponentDef componentDef, PropertyDef propertyDef, PropertyDesc propertyDesc, Object component) { final Object value = getValue(componentDef, propertyDef, component, propertyDesc.getPropertyType()); setPropertyValue(componentDef, propertyDesc, component, value); }
if (hasComponentByType) { final ComponentDef cd = container.getComponentDef(propType); if (isSimpleNamingAutoBindable(propName, propType, cd)) { Object value = getComponent(componentDef, propType, component, propName); setResourceFieldValue(componentDef, field, component, value); return true; final Object value = getComponent(componentDef, propName, component, propName); if (propType.isInstance(value)) { setResourceFieldValue(componentDef, field, component, value); return true; if (isFieldAutoBindable(propType)) { if (hasComponentByType) { final Object value = getComponent(componentDef, propType, component, propName); setResourceFieldValue(componentDef, field, component, value); return true; setResourceFieldValue(componentDef, field, component, componentDef); return true; final Object[] values = container.findAllComponents(clazz); if (values.length > 0) { setResourceFieldValue(componentDef, field, component, values); return true;
if (hasComponentByType) { final ComponentDef cd = container.getComponentDef(propType); if (isSimpleNamingAutoBindable(propName, propType, cd)) { final Object value = getComponent(componentDef, propType, component, propName); setPropertyValue(componentDef, propertyDesc, component, value); return true; final Object value = getComponent(componentDef, propName, component, propName); if (propType.isInstance(value)) { setPropertyValue(componentDef, propertyDesc, component, value); return true; if (isPropertyAutoBindable(propType)) { if (hasComponentByType) { final Object value = getComponent(componentDef, propType, component, propName); setPropertyValue(componentDef, propertyDesc, component, value); return true; setPropertyValue(componentDef, propertyDesc, component, componentDef); return true; final Object[] values = container.findAllComponents(clazz); if (values.length > 0) { setPropertyValue(componentDef, propertyDesc, component, values); return true;
@Override public void bind(ComponentDef componentDef, PropertyDef propertyDef, PropertyDesc propertyDesc, Object component) { if (propertyDef != null && propertyDef.isValueGettable()) { if (propertyDesc != null && propertyDesc.isWritable()) { bindManualProperty(componentDef, propertyDef, propertyDesc, component); } } else { if (propertyDesc != null && propertyDesc.isWritable()) { doBindProperty(componentDef, propertyDesc, component); } } }