public void fireProcessProducerMethodBeanEvent(Map<ProducerMethodBean<?>, AnnotatedMethod<?>> annotatedMethods, AnnotatedType<?> annotatedType)
{
WebBeansContext webBeansContext = this.webBeansContext;
AnnotationManager annotationManager = webBeansContext.getAnnotationManager();
for(Map.Entry<ProducerMethodBean<?>, AnnotatedMethod<?>> beanEntry : annotatedMethods.entrySet())
{
ProducerMethodBean<?> bean = beanEntry.getKey();
AnnotatedMethod<?> annotatedMethod = beanEntry.getValue();
Annotation[] annotationsFromSet = AnnotationUtil.asArray(bean.getQualifiers());
Method disposal = annotationManager.getDisposalWithGivenAnnotatedMethod(annotatedType, bean.getReturnType(), annotationsFromSet);
AnnotatedMethod<?> disposalAnnotated;
GProcessProducerMethod processProducerMethodEvent;
if(disposal != null)
{
disposalAnnotated = webBeansContext.getAnnotatedElementFactory().newAnnotatedMethod(disposal, annotatedType);
processProducerMethodEvent = new GProcessProducerMethod(bean,annotatedMethod,
disposalAnnotated.getParameters().get(0));
}
else
{
processProducerMethodEvent = new GProcessProducerMethod(bean,annotatedMethod,null);
}
webBeansContext.getBeanManagerImpl().fireEvent(processProducerMethodEvent, true, AnnotationUtil.EMPTY_ANNOTATION_ARRAY);
processProducerMethodEvent.setStarted();
}
}