/** * Processing bean. * * @param event the event. */ public void processBean(@Observes ProcessBean<?> event) { ViewScoped viewScoped = event.getAnnotated().getAnnotation(ViewScoped.class); if (viewScoped != null && LOGGER.isLoggable(Level.FINEST)) { LOGGER.finest("Processing occurrence of @ViewScoped"); } }
/** * Processing bean. * * @param event the event. */ public void processBean(@Observes ProcessBean<?> event) { ViewScoped viewScoped = event.getAnnotated().getAnnotation(ViewScoped.class); if (viewScoped != null && LOGGER.isLoggable(Level.FINEST)) { LOGGER.finest("Processing occurrence of @ViewScoped"); } }
/** * Processing bean. * * @param event the event. */ public void processBean(@Observes ProcessBean<?> event) { ViewScoped viewScoped = event.getAnnotated().getAnnotation(ViewScoped.class); if (viewScoped != null && LOGGER.isLoggable(Level.FINEST)) { LOGGER.finest("Processing occurrence of @ViewScoped"); } }
/** * Processing bean. * * @param event the event. */ public void processBean(@Observes ProcessBean<?> event) { ViewScoped viewScoped = event.getAnnotated().getAnnotation(ViewScoped.class); if (viewScoped != null && LOGGER.isLoggable(Level.FINEST)) { LOGGER.finest("Processing occurrence of @ViewScoped"); } }
<T> void findEndpointsAndApplication(@Observes final ProcessBean<T> event) { final String typeName = event.getAnnotated().getBaseType().getTypeName(); if (classes == null && !skipScan && event.getAnnotated().isAnnotationPresent(Path.class) && !typeName.startsWith("org.apache.geronimo.microprofile.openapi.") && (packages == null || packages.stream().anyMatch(typeName::startsWith))) { endpoints.add(event.getBean()); } }
<X> void processBean(@Observes ProcessBean<X> event) { if (event.getAnnotated().isAnnotationPresent(Startup.class) && event.getAnnotated().isAnnotationPresent(ApplicationScoped.class)) { startupBeans.add(event.getBean()); } }
/** * Add beans to eager startup beans registry. * * @param event event to process * @param <T> the type. */ public <T> void collect(@Observes ProcessBean<T> event) { if (event.getAnnotated().isAnnotationPresent(Eager.class) && event.getAnnotated().isAnnotationPresent(ApplicationScoped.class)) { this.eagerBeansList.add(event.getBean()); } }
public <T> void collect(@Observes ProcessBean<T> event) { if (event.getAnnotated().isAnnotationPresent(Eager.class) && event.getAnnotated().isAnnotationPresent(ApplicationScoped.class)) { eagerBeansList.add(event.getBean()); } } public void load(@Observes AfterDeploymentValidation event, BeanManager beanManager) {
public <T> void collect(@Observes ProcessBean<T> event) { if (event.getAnnotated().isAnnotationPresent(Eager.class) && event.getAnnotated().isAnnotationPresent(ApplicationScoped.class)) { eagerBeansList.add(event.getBean()); } } public void load(@Observes AfterDeploymentValidation event, BeanManager beanManager) {
public void failIfJsfManagedBeanAnnotationPresent(@Observes final ProcessBean<?> bean) { if (bean.getAnnotated().isAnnotationPresent(javax.faces.bean.ManagedBean.class)) { bean.addDefinitionError(new RuntimeException("Use of @javax.faces.bean.ManagedBean is forbidden. Please use @javax.inject.Named instead.")); } }
public void failIfJsfManagedBeanAnnotationPresent(@Observes final ProcessBean<?> bean) { if (bean.getAnnotated().isAnnotationPresent(javax.faces.bean.ManagedBean.class)) { bean.addDefinitionError(new RuntimeException( "Use of @javax.faces.bean.ManagedBean is forbidden. Please use @javax.inject.Named instead.")); } }
public <T> void collect(@Observes final ProcessBean<T> processBean) { if (active && processBean.getAnnotated().isAnnotationPresent(marker)) { serviceBeans.add(processBean.getBean()); } }
<X> void processBean(@Observes ProcessBean<X> event) { if (!Endoscope.isEnabled()) { return; } if( event.getAnnotated().isAnnotationPresent(EndoscopeStartup.class) ){ startupBeans.add(event.getBean()); } }
<X> void processBean(@Observes ProcessBean<X> event) { if (!Endoscope.isEnabled()) { return; } if( event.getAnnotated().isAnnotationPresent(EndoscopeStartup.class) ){ startupBeans.add(event.getBean()); } }
void findChecks(@Observes final ProcessBean<?> bean) { if (bean.getAnnotated().isAnnotationPresent(Health.class) && bean.getBean().getTypes().contains(HealthCheck.class)) { beans.add(bean.getBean()); } }
public void processBean(@Observes ProcessBean<?> event) { FlowScoped flowScoped = event.getAnnotated().getAnnotation(FlowScoped.class); if (null != flowScoped) { FlowCDIContext.FlowBeanInfo fbi = new FlowCDIContext.FlowBeanInfo(); fbi.definingDocumentId = flowScoped.definingDocumentId(); fbi.id = flowScoped.value(); flowScopedBeanFlowIds.put(event.getBean(), fbi); } }
public void processBean(@Observes ProcessBean<?> event) { FlowScoped flowScoped = event.getAnnotated().getAnnotation(FlowScoped.class); if (null != flowScoped) { FlowCDIContext.FlowBeanInfo fbi = new FlowCDIContext.FlowBeanInfo(); fbi.definingDocumentId = flowScoped.definingDocumentId(); fbi.id = flowScoped.value(); flowScopedBeanFlowIds.put(event.getBean(), fbi); } }
/** * Adds a new bean definition to the manager */ public <T> void addBean(Bean<T> bean, ProcessBean<T> process) { bean = getExtensionManager().processBean(bean, process); if (bean != null) addBeanImpl(bean, process.getAnnotated()); }
public void processBean(@Observes ProcessBean<?> event) { FlowScoped flowScoped = event.getAnnotated().getAnnotation(FlowScoped.class); if (null != flowScoped) { FlowCDIContext.FlowBeanInfo fbi = new FlowCDIContext.FlowBeanInfo(); fbi.definingDocumentId = flowScoped.definingDocumentId(); fbi.id = flowScoped.value(); flowScopedBeanFlowIds.put(event.getBean(), fbi); } }
public void processBean(@Observes ProcessBean<?> event) { FlowScoped flowScoped = event.getAnnotated().getAnnotation(FlowScoped.class); if (null != flowScoped) { FlowCDIContext.FlowBeanInfo fbi = new FlowCDIContext.FlowBeanInfo(); fbi.definingDocumentId = flowScoped.definingDocumentId(); fbi.id = flowScoped.value(); flowScopedBeanFlowIds.put(event.getBean(), fbi); } }