resteasy-cdi/src/main/java/org/jboss/resteasy/cdi/ResteasyCdiExtension.java
public <T> void observeProviders(@WithAnnotations({Provider.class}) @Observes ProcessAnnotatedType<T> event, BeanManager beanManager)
   {
      setBeanManager(beanManager);
      AnnotatedType<T> annotatedType = event.getAnnotatedType();

      if(!annotatedType.getJavaClass().isInterface()
               && !isSessionBean(annotatedType)
               // This check is redundant for CDI 1.1 containers but required for CDI 1.0
               && annotatedType.isAnnotationPresent(Provider.class))
      {
         LogMessages.LOGGER.debug(Messages.MESSAGES.discoveredCDIBeanJaxRsProvider(annotatedType.getJavaClass().getCanonicalName()));
         event.setAnnotatedType(wrapAnnotatedType(annotatedType, applicationScopedLiteral));
         this.providers.add(annotatedType.getJavaClass());
      }
   }
/**
    * Set a default scope for each CDI bean which is a JAX-RS Provider.
    *
    * @param <T> type
    * @param event event
    * @param beanManager bean manager
    */
Set a default scope for each CDI bean which is a JAX-RS Provider.
Set a default scope for each CDI bean which is a JAX - RS Provider .
public <T> void observeProviders(@WithAnnotations({Provider.class}) @Observes ProcessAnnotatedType<T> event, BeanManager beanManager)
   {
      setBeanManager(beanManager);
      AnnotatedType<T> annotatedType = event.getAnnotatedType();
      if(!annotatedType.getJavaClass().isInterface()
               && !isSessionBean(annotatedType)
               && annotatedType.isAnnotationPresent(Provider.class))
      {
         LogMessages.LOGGER.debug(Messages.MESSAGES.discoveredCDIBeanJaxRsProvider(annotatedType.getJavaClass().getCanonicalName()));
         event.setAnnotatedType(wrapAnnotatedType(annotatedType, applicationScopedLiteral));
         this.providers.add(annotatedType.getJavaClass());
      }
   }
public < T > void observeProviders ( @ WithAnnotations ( { Provider . class } ) @ Observes ProcessAnnotatedType < T > event , BeanManager beanManager ) { setBeanManager ( beanManager ) ; AnnotatedType < T > annotatedType = event . getAnnotatedType ( ) ; if ( ! annotatedType . getJavaClass ( ) . isInterface ( ) && ! isSessionBean ( annotatedType ) && annotatedType . isAnnotationPresent ( Provider . class ) ) { LogMessages . LOGGER . debug ( Messages . MESSAGES . discoveredCDIBeanJaxRsProvider ( annotatedType . getJavaClass ( ) . getCanonicalName ( ) ) ) ; event . setAnnotatedType ( wrapAnnotatedType ( annotatedType , applicationScopedLiteral ) ) ; this . providers . add ( annotatedType . getJavaClass ( ) ) ; } }
Set a default scope for each CDI bean which is a JAX-RS Provider.
Set a default scope for each CDI bean which is a JAX - RS Provider .
// This check is redundant for CDI 1.1 containers but required for CDI 1.0