// Methods --------------------------------------------------------------------------------------------------------
public <T> void collect(@Observes ProcessBean<T> event, BeanManager beanManager) {
Annotated annotated = event.getAnnotated();
Eager eager = getAnnotation(beanManager, annotated, Eager.class);
if (eager != null) {
Bean<?> bean = event.getBean();
if (getAnnotation(beanManager, annotated, ApplicationScoped.class) != null) {
applicationScopedBeans.add(bean);
} else if (getAnnotation(beanManager, annotated, SessionScoped.class) != null) {
sessionScopedBeans.add(bean);
} else if (getAnnotation(beanManager, annotated, RequestScoped.class) != null) {
if (!isEmpty(eager.requestURI())) {
getRequestScopedBeansByRequestURI(eager.requestURI()).add(bean);
} else if (!isEmpty(eager.viewId())) {
getRequestScopedBeansByViewId(eager.viewId()).add(bean);
} else {
logger.severe(format(MISSING_REQUEST_URI_OR_VIEW_ID, bean.getBeanClass().getName(), RequestScoped.class.getName()));
}
} else if (getAnnotation(beanManager, annotated, ViewScoped.class) != null) {
if (!isEmpty(eager.viewId())) {
getRequestScopedBeansByViewId(eager.viewId()).add(bean);
} else {
logger.severe(format(MISSING_VIEW_ID, bean.getBeanClass().getName(), ViewScoped.class.getName()));
}
}
}