Package org.jboss.scanning.annotations.spi

Examples of org.jboss.scanning.annotations.spi.AnnotationIndex


      }
   }

   private boolean excludeClassLevelInterceptorsExist(DeploymentUnit unit)
   {
      AnnotationIndex annotationRepository = unit.getAttachment(AnnotationIndex.class);
      if (annotationRepository != null)
      {
         return !annotationRepository.classIsAnnotatedWith(ExcludeDefaultInterceptors.class).isEmpty();
      }
      else
      {
         // if annotations are not scanned we won't bother checking each EJB class
         // let interceptors just go at the class level
View Full Code Here


      }
   }

   private Set<Element<ExcludeDefaultInterceptors,Method>> getMethodsWithExcludedDefaults(DeploymentUnit unit)
   {
      AnnotationIndex annotationRepository = unit.getAttachment(AnnotationIndex.class);

      if (annotationRepository != null)
      {
         return annotationRepository.classHasMethodAnnotatedWith(ExcludeDefaultInterceptors.class);

      }
      else
      {
         // no scanning info, ignore those methods
View Full Code Here

      }
   }

   private Set<Element<ExcludeClassInterceptors,Method>> getMethodsWithExcludedClasses(DeploymentUnit unit)
   {
      AnnotationIndex annotationRepository = unit.getAttachment(AnnotationIndex.class);

      if (annotationRepository != null)
      {
         return annotationRepository.classHasMethodAnnotatedWith(ExcludeClassInterceptors.class);
      }
      else
      {
         // no scanning info, ignore those methods
         return Collections.emptySet();
View Full Code Here

         unit = unit.getParent();
     
      Set<String> classNames = (Set<String>)unit.getAttachment(ATTACHMENT);
      if (classNames == null)
      {
         AnnotationIndex index = unit.getAttachment(AnnotationIndex.class);
         if (index == null)
            return false;
        
         Set<Element<Weld, ?>> result = new HashSet<Element<Weld, ?>>(1);
         result.addAll(index.classHasConstructorAnnotatedWith(Weld.class));
         result.addAll(index.classHasFieldAnnotatedWith(Weld.class));
         result.addAll(index.classHasMethodAnnotatedWith(Weld.class));
        
         if (result.size() == 0)
         {
            classNames = Collections.emptySet();
         }
View Full Code Here

      setStage(DeploymentStages.POST_CLASSLOADER);
   }

   public void deploy(DeploymentUnit unit, JBossWebMetaData deployment) throws DeploymentException
   {
      AnnotationIndex ai = unit.getAttachment(AnnotationIndex.class);
      if (ai == null)
         return;

      HierarchyIndex hi = unit.getAttachment(HierarchyIndex.class);
      if (hi == null)
View Full Code Here

            LOGGER.debug("Expecting HierarchyIndex class for scanning WAR for JAX-RS Application class");
         }
      }

      // Looked for annotated resources and providers
      AnnotationIndex env = du.getAttachment(AnnotationIndex.class);
      if (env == null)
      {
         LOGGER.debug("Expecting AnnotationRepository class for scanning WAR for JAX-RS classes");
         return;
      }


      Set<Element<Path, Class<?>>> resources = null;
      Set<Element<Provider, Class<?>>> providers = null;
      if (resteasyDeploymentData.isScanResources())
      {
         resources = env.classIsAnnotatedWith(Path.class);
      }
      if (resteasyDeploymentData.isScanProviders())
      {
         providers = env.classIsAnnotatedWith(Provider.class);
      }

      if ((resources == null || resources.isEmpty()) && (providers == null || providers.isEmpty())) return;

      if (resources != null)
      {
         for (Element e : resources)
         {
            if (e.getOwner().isInterface())
            {
               continue;
            }
            resteasyDeploymentData.getScannedResourceClasses().add(e.getOwnerClassName());
         }
      }
      if (providers != null)
      {
         for (Element e : providers)
         {
            if (e.getOwner().isInterface()) continue;
            resteasyDeploymentData.getScannedProviderClasses().add(e.getOwnerClassName());
         }
      }

      Set<String> strings = env.classesImplementingInterfacesAnnotatedWith(Path.class.getName());
      resteasyDeploymentData.getScannedResourceClasses().addAll(strings);
   }
View Full Code Here

TOP

Related Classes of org.jboss.scanning.annotations.spi.AnnotationIndex

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.