Element typeElement = (Element) childElement.getChildNodes().item(0);
eventType = (Class<K>) XMLUtil.getElementJavaType(typeElement);
/* Find observes method model */
XMLInjectionPointModel model = XMLUtil.getInjectionPointModel(typeElement, errorMessage);
component.addInjectionPoint(getXMLMethodInjectionPoint(component, model, observesMethod));
/* Binding types for disposal method */
Set<Annotation> bindingTypes = model.getBindingTypes();
Annotation[] bindingAnns = new Annotation[bindingTypes.size()];
bindingAnns = bindingTypes.toArray(bindingAnns);
beanObserver = new BeanObserverXMLImpl<K>(component, observesMethod, false,
bindingAnns, null /** TODO Type! */);
beanObserver.addXMLInjectionObservesParameter(model);
NotificationManager.getInstance().addObserver(beanObserver, eventType);
}
/* Disposal method parameter other than @Disposes */
else
{
otherParameterElements.add(childElement);
}
}// end of for childs
/* Add other params injection point models */
if (beanObserver != null)
{
for (Element otherElement : otherParameterElements)
{
XMLInjectionPointModel injectionPointParamModel = XMLUtil.getInjectionPointModel(otherElement, errorMessage);
beanObserver.addXMLInjectionObservesParameter(injectionPointParamModel);
}
}
}