/** * Registers set injection point. * * @param beanName bean name * @param property set property name */ public void registerPetiteSetInjectionPoint(final String beanName, final String property) { BeanDefinition beanDefinition = lookupExistingBeanDefinition(beanName); ClassDescriptor cd = ClassIntrospector.get().lookup(beanDefinition.type); PropertyDescriptor propertyDescriptor = cd.getPropertyDescriptor(property, true); if (propertyDescriptor == null) { throw new PetiteException("Property not found: " + beanDefinition.type.getName() + '#' + property); } SetInjectionPoint sip = new SetInjectionPoint(propertyDescriptor); beanDefinition.addSetInjectionPoint(sip); }
/** * Single point of property injection point registration. */ protected void registerPetiteSetInjectionPoint(String beanName, String property) { BeanDefinition beanDefinition = lookupExistingBeanDefinition(beanName); SetInjectionPoint sip = defineSetInjectionPoint( beanDefinition.type, property); beanDefinition.addSetInjectionPoint(sip); }
/** * Registers set injection point. * * @param beanName bean name * @param property set property name */ public void registerPetiteSetInjectionPoint(final String beanName, final String property) { BeanDefinition beanDefinition = lookupExistingBeanDefinition(beanName); ClassDescriptor cd = ClassIntrospector.get().lookup(beanDefinition.type); PropertyDescriptor propertyDescriptor = cd.getPropertyDescriptor(property, true); if (propertyDescriptor == null) { throw new PetiteException("Property not found: " + beanDefinition.type.getName() + '#' + property); } SetInjectionPoint sip = new SetInjectionPoint(propertyDescriptor); beanDefinition.addSetInjectionPoint(sip); }