Package org.jboss.mcann.scanner

Examples of org.jboss.mcann.scanner.ModuleAnnotationScanner


   protected void visitModule(VFSDeploymentUnit unit, Module module) throws DeploymentException
   {
      try
      {
         URL[] urls = ClasspathUtils.getUrls(unit);
         DefaultAnnotationScanner scanner = new ModuleAnnotationScanner(module);

         AbstractConfiguration config = new DefaultConfiguration();
         configureScanner(unit, scanner, config);
         if (configuration != null)
            config.merge(configuration); // override with custom config
         scanner.setConfiguration(config);

         AnnotationRepository repository = scanner.scan(unit.getClassLoader(), urls);
         unit.addAttachment(AnnotationRepository.class, repository);
      }
      catch (Exception e)
      {
         throw DeploymentException.rethrowAsDeploymentException("Exception visiting module", e);
View Full Code Here


   public void deploy(DeploymentUnit unit, Module deployment) throws DeploymentException
   {
      try
      {
         DefaultAnnotationScanner scanner = new ModuleAnnotationScanner(deployment);
         if (configuration != null)
            scanner.setConfiguration(configuration);
        
         AnnotationRepository repository = scanner.scan(unit.getClassLoader());
         unit.addAttachment(AnnotationRepository.class, repository);
      }
      catch (Exception e)
      {
         throw DeploymentException.rethrowAsDeploymentException("Cannot create AR", e);
View Full Code Here

TOP

Related Classes of org.jboss.mcann.scanner.ModuleAnnotationScanner

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.