Package org.jboss.scanning.annotations.plugins

Examples of org.jboss.scanning.annotations.plugins.AnnotationsScanningPlugin


   public void deploy(DeploymentUnit unit, Module deployment) throws DeploymentException
   {
      try
      {
         AbstractScanner scanner = new DeploymentUnitScanner(unit);
         AnnotationsScanningPlugin plugin = new AnnotationsScanningPlugin(unit.getClassLoader());
         scanner.addPlugin(plugin);

         scanner.scan();

         AnnotationRepository repository = unit.getAttachment(plugin.getAttachmentKey(), AnnotationRepository.class);
         unit.addAttachment(AnnotationRepository.class, repository);
      }
      catch (Exception e)
      {
         throw DeploymentException.rethrowAsDeploymentException("Cannot create AR", e);
View Full Code Here


      DeploymentResourceLoader loader = new VFSDeploymentResourceLoaderImpl(root);
      ClassLoader classLoader = new DeploymentResourceClassLoader(loader);
      try
      {
         DefaultScanner scanner = new DefaultScanner(classLoader, root.toURL());
         AnnotationsScanningPlugin plugin = new AnnotationsScanningPlugin(classLoader)
         {
            @Override
            public ResourceFilter getRecurseFilter()
            {
               return recurseFilter;
View Full Code Here

   {
      try
      {
         URL[] urls = ClasspathUtils.getUrls(unit);
         DeploymentUnitScanner scanner = new DeploymentUnitScanner(unit, urls);
         AnnotationsScanningPlugin plugin = createPlugin(unit);
         scanner.addPlugin(plugin);

         configureScanner(scanner);

         scanner.scan();

         AnnotationRepository repository = unit.getAttachment(plugin.getAttachmentKey(), AnnotationRepository.class);
         unit.addAttachment(AnnotationRepository.class, repository);
      }
      catch (Exception e)
      {
         throw DeploymentException.rethrowAsDeploymentException("Exception visiting module", e);
View Full Code Here

    * @param unit the deployment unit
    * @return new annotation plugin
    */
   protected AnnotationsScanningPlugin createPlugin(VFSDeploymentUnit unit)
   {
      return new AnnotationsScanningPlugin(unit.getClassLoader());
   }
View Full Code Here

   }

   @Override
   protected AnnotationsScanningPlugin createPlugin(final VFSDeploymentUnit unit)
   {
      return new AnnotationsScanningPlugin(unit.getClassLoader())
      {
         @Override
         public ResourceFilter getFilter()
         {
            return getAttachment(unit, ResourceFilter.class, "resource", resourceFilter);
View Full Code Here

TOP

Related Classes of org.jboss.scanning.annotations.plugins.AnnotationsScanningPlugin

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.