/** * 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); }
list.add(new SetInjectionPoint(propertyDescriptor));
/** * 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); }
list.add(new SetInjectionPoint(propertyDescriptor));