[jboss-cvs] JBossAS SVN: r81004 - in projects/jboss-deployers/trunk: deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/annotations and 15 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Nov 14 07:16:58 EST 2008


Author: alesj
Date: 2008-11-14 07:16:58 -0500 (Fri, 14 Nov 2008)
New Revision: 81004

Added:
   projects/jboss-deployers/trunk/deployers-impl/src/main/java/org/jboss/deployers/plugins/annotations/FilterablePathEntry.java
   projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/helpers/Base2VFSBridgeDeploymentUnitFilter.java
   projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/helpers/VFS2BaseBridgeDeploymentUnitFilter.java
   projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/annotations/ScanningDeploymentUnitFilter.java
   projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/annotations/ScanningMetaDataResourceFilter.java
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/annotations/AnnotationScanningTestSuite.java
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/annotations/support/jar/JarMarkOnClass.java
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/annotations/support/jar/JarMarkOnClassSuper.java
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/annotations/support/jar/impl/
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/annotations/support/jar/impl/JarMarkOnClassImpl.java
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/annotations/support/war/WebMarkOnClass.java
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/annotations/support/war/WebMarkOnClassSuper.java
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/annotations/support/war/impl/
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/annotations/support/war/impl/WebMarkOnClassImpl.java
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/annotations/support/warlib/
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/annotations/support/warlib/SomeUIClass.java
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/annotations/test/AbstractAnnotationsScanningUnitTest.java
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/annotations/test/AnnotationsScanningWithMetaDataUnitTestCase.java
   projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/annotations/basic-scan/META-INF/jboss-scanning.xml
   projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/annotations/basic-scan/jar/META-INF/jboss-scanning.xml
   projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/annotations/basic-scan/web/WEB-INF/jboss-scanning.xml
   projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/org/jboss/test/deployers/vfs/annotations/test/AnnotationsScanningWithMetaDataUnitTestCase.xml
Removed:
   projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/helpers/BridgeDeploymentUnitFilter.java
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/annotations/support/jar/JarMarkOnClass.java
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/annotations/support/jar/JarMarkOnClassSuper.java
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/annotations/support/war/WebMarkOnClass.java
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/annotations/support/war/WebMarkOnClassSuper.java
Modified:
   projects/jboss-deployers/trunk/deployers-impl/src/main/java/org/jboss/deployers/plugins/annotations/AbstractPathEntryMetaData.java
   projects/jboss-deployers/trunk/deployers-impl/src/main/java/org/jboss/deployers/plugins/annotations/AbstractPathMetaData.java
   projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/helpers/VirtualFileDeploymentUnitFilter.java
   projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/classloader/InMemoryClassesDeployer.java
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/DeployersVFSTestSuite.java
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/annotations/test/AnnotationsScanningUnitTestCase.java
   projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/annotations/basic-scan/jar/META-INF/MANIFEST.MF
Log:
[JBDEPLOY-131]; scanning metadata deployment unit filter.

Modified: projects/jboss-deployers/trunk/deployers-impl/src/main/java/org/jboss/deployers/plugins/annotations/AbstractPathEntryMetaData.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-impl/src/main/java/org/jboss/deployers/plugins/annotations/AbstractPathEntryMetaData.java	2008-11-14 12:16:20 UTC (rev 81003)
+++ projects/jboss-deployers/trunk/deployers-impl/src/main/java/org/jboss/deployers/plugins/annotations/AbstractPathEntryMetaData.java	2008-11-14 12:16:58 UTC (rev 81004)
@@ -22,10 +22,12 @@
 package org.jboss.deployers.plugins.annotations;
 
 import java.io.Serializable;
-
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlTransient;
 import javax.xml.bind.annotation.XmlType;
-import javax.xml.bind.annotation.XmlAttribute;
 
+import org.jboss.classloader.spi.filter.ClassFilter;
+import org.jboss.classloader.spi.filter.PackageClassFilter;
 import org.jboss.deployers.spi.annotations.PathEntryMetaData;
 
 /**
@@ -34,12 +36,23 @@
  * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
  */
 @XmlType(name="pathEntryType")
-public class AbstractPathEntryMetaData implements PathEntryMetaData, Serializable
+public class AbstractPathEntryMetaData implements PathEntryMetaData, FilterablePathEntry, Serializable
 {
    private static final long serialVersionUID = 1L;
 
    private String name;
+   private transient ClassFilter filter;
 
+   @XmlTransient
+   public ClassFilter getFilter()
+   {
+      if (filter == null)
+         filter = PackageClassFilter.createPackageClassFilter(getNameInternal());
+      
+      return filter;
+   }
+
+   @XmlTransient
    private String getNameInternal()
    {
       if (name == null)
@@ -53,7 +66,7 @@
       return name;
    }
 
-   @XmlAttribute(name = "name")
+   @XmlAttribute(name = "name", required = true)
    public void setName(String name)
    {
       this.name = name;

Modified: projects/jboss-deployers/trunk/deployers-impl/src/main/java/org/jboss/deployers/plugins/annotations/AbstractPathMetaData.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-impl/src/main/java/org/jboss/deployers/plugins/annotations/AbstractPathMetaData.java	2008-11-14 12:16:20 UTC (rev 81003)
+++ projects/jboss-deployers/trunk/deployers-impl/src/main/java/org/jboss/deployers/plugins/annotations/AbstractPathMetaData.java	2008-11-14 12:16:58 UTC (rev 81004)
@@ -51,7 +51,7 @@
       return pathName;
    }
 
-   @XmlAttribute(name = "name")
+   @XmlAttribute(name = "name", required = true)
    public void setPathName(String pathName)
    {
       this.pathName = pathName;

Added: projects/jboss-deployers/trunk/deployers-impl/src/main/java/org/jboss/deployers/plugins/annotations/FilterablePathEntry.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-impl/src/main/java/org/jboss/deployers/plugins/annotations/FilterablePathEntry.java	                        (rev 0)
+++ projects/jboss-deployers/trunk/deployers-impl/src/main/java/org/jboss/deployers/plugins/annotations/FilterablePathEntry.java	2008-11-14 12:16:58 UTC (rev 81004)
@@ -0,0 +1,39 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.deployers.plugins.annotations;
+
+import org.jboss.classloader.spi.filter.ClassFilter;
+
+/**
+ * FilterablePathEntry
+ *
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+public interface FilterablePathEntry
+{
+   /**
+    * Get class filter.
+    *
+    * @return the filter
+    */
+   ClassFilter getFilter();
+}

Added: projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/annotations/ScanningDeploymentUnitFilter.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/annotations/ScanningDeploymentUnitFilter.java	                        (rev 0)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/annotations/ScanningDeploymentUnitFilter.java	2008-11-14 12:16:58 UTC (rev 81004)
@@ -0,0 +1,125 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.deployers.vfs.plugins.annotations;
+
+import java.net.URL;
+import java.util.List;
+
+import org.jboss.classloading.spi.visitor.ResourceContext;
+import org.jboss.classloading.spi.visitor.ResourceFilter;
+import org.jboss.deployers.spi.annotations.PathMetaData;
+import org.jboss.deployers.spi.annotations.ScanningMetaData;
+import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
+import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnitFilter;
+import org.jboss.logging.Logger;
+
+/**
+ * ScanningDeploymentUnitFilter
+ *
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+public class ScanningDeploymentUnitFilter implements VFSDeploymentUnitFilter
+{
+   private Logger log = Logger.getLogger(getClass());
+
+   public boolean accepts(VFSDeploymentUnit unit)
+   {
+      ScanningMetaData smd = unit.getAttachment(ScanningMetaData.class);
+      if (smd != null)
+      {
+         // recurse
+         ResourceFilter recurse = createRecurseFilter(smd);
+         if (recurse != null)
+         {
+            ResourceFilter previousRecurse = unit.addAttachment(ResourceFilter.class.getName() + ".recurse", recurse, ResourceFilter.class);
+            if (previousRecurse != null)
+               log.debug("Overridding previous recurse filter: " + previousRecurse);
+         }
+
+         // resource
+         ResourceFilter filter = createResourceFilter(smd);
+         if (filter != null)
+         {
+            ResourceFilter previousFilter = unit.addAttachment(ResourceFilter.class.getName() + ".resource", filter, ResourceFilter.class);
+            if (previousFilter != null)
+               log.debug("Overridding previous resource filter: " + previousFilter);
+         }
+      }
+      return true;
+   }
+
+   /**
+    * Create recurse filter.
+    *
+    * @param smd the scanning metadata
+    * @return recurse filter
+    */
+   protected ResourceFilter createRecurseFilter(ScanningMetaData smd)
+   {
+      return new ScanningMetaDataRecurseFilter(smd);
+   }
+
+   /**
+    * Create resource filter.
+    *
+    * @param smd the scanning metadata
+    * @return resource filter
+    */
+   protected ResourceFilter createResourceFilter(ScanningMetaData smd)
+   {
+      return new ScanningMetaDataResourceFilter(smd);
+   }
+
+   /**
+    * Simple recurse filter.
+    * It searches for path substring in url string.
+    */
+   private class ScanningMetaDataRecurseFilter implements ResourceFilter
+   {
+      private ScanningMetaData smd;
+
+      private ScanningMetaDataRecurseFilter(ScanningMetaData smd)
+      {
+         this.smd = smd;
+      }
+
+      public boolean accepts(ResourceContext resource)
+      {
+         URL url = resource.getUrl();
+         String urlString = url.toExternalForm();
+         List<PathMetaData> paths = smd.getPaths();
+         if (paths != null && paths.isEmpty() == false)
+         {
+            for (PathMetaData pmd : paths)
+            {
+               String name = pmd.getPathName();
+               // url contains path
+               if (urlString.contains(name))
+               {
+                  return true;
+               }
+            }
+         }
+         return false;
+      }
+   }
+}

Added: projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/annotations/ScanningMetaDataResourceFilter.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/annotations/ScanningMetaDataResourceFilter.java	                        (rev 0)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/annotations/ScanningMetaDataResourceFilter.java	2008-11-14 12:16:58 UTC (rev 81004)
@@ -0,0 +1,113 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.deployers.vfs.plugins.annotations;
+
+import java.net.URL;
+import java.util.List;
+import java.util.Set;
+
+import org.jboss.classloader.spi.filter.ClassFilter;
+import org.jboss.classloader.spi.filter.PackageClassFilter;
+import org.jboss.classloading.spi.visitor.ResourceContext;
+import org.jboss.classloading.spi.visitor.ResourceFilter;
+import org.jboss.deployers.spi.annotations.PathEntryMetaData;
+import org.jboss.deployers.spi.annotations.PathMetaData;
+import org.jboss.deployers.spi.annotations.ScanningMetaData;
+import org.jboss.deployers.plugins.annotations.FilterablePathEntry;
+
+/**
+ * ScanningMetaDataResourceFilter
+ *
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+public class ScanningMetaDataResourceFilter implements ResourceFilter
+{
+   private ScanningMetaData smd;
+
+   public ScanningMetaDataResourceFilter(ScanningMetaData smd)
+   {
+      this.smd = smd;
+   }
+
+   public boolean accepts(ResourceContext resource)
+   {
+      if (resource.isClass() == false)
+         return false;
+
+      URL url = resource.getUrl();
+      String urlString = url.toExternalForm();
+      List<PathMetaData> paths = smd.getPaths();
+      if (paths != null && paths.isEmpty() == false)
+      {
+         for (PathMetaData pmda : paths)
+         {
+            String name = pmda.getPathName();
+            // url contains path + we need some include or exclude
+            if (urlString.contains(name))
+            {
+               String resourceName = resource.getResourceName();
+               boolean explicitInclude = false; // do we have an explicit include
+
+               Set<PathEntryMetaData> includes = pmda.getIncludes();
+               if (includes != null && includes.isEmpty() == false)
+               {
+                  explicitInclude = true;
+                  for (PathEntryMetaData pemda : includes)
+                  {
+                     ClassFilter filter = getClassFilter(pemda);
+                     if (filter.matchesResourcePath(resourceName))
+                        return true;
+                  }
+               }
+
+               Set<PathEntryMetaData> excludes = pmda.getExcludes();
+               if (excludes != null && excludes.isEmpty() == false)
+               {
+                  for (PathEntryMetaData pemda : excludes)
+                  {
+                     ClassFilter filter = getClassFilter(pemda);
+                     if (filter.matchesResourcePath(resourceName))
+                        return false;
+                  }
+               }
+
+               return (explicitInclude == false);
+            }
+         }
+      }
+      return false;
+   }
+
+   /**
+    * Get class filter from path entry meta data.
+    *
+    * @param pemd the path entry meta data
+    * @return class filter
+    */
+   protected ClassFilter getClassFilter(PathEntryMetaData pemd)
+   {
+      if (pemd instanceof FilterablePathEntry)
+         return ((FilterablePathEntry) pemd).getFilter();
+      else
+         return PackageClassFilter.createPackageClassFilter(pemd.getName());
+   }
+}
\ No newline at end of file

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/classloader/InMemoryClassesDeployer.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/classloader/InMemoryClassesDeployer.java	2008-11-14 12:16:20 UTC (rev 81003)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/classloader/InMemoryClassesDeployer.java	2008-11-14 12:16:58 UTC (rev 81004)
@@ -37,6 +37,7 @@
  * TempURLDeployer.
  * 
  * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @author <a href="ales.justin at jboss.com">Ales Justin</a>
  * @version $Revision: 1.1 $
  */
 public class InMemoryClassesDeployer extends AbstractVFSRealDeployer

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/DeployersVFSTestSuite.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/DeployersVFSTestSuite.java	2008-11-14 12:16:20 UTC (rev 81003)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/DeployersVFSTestSuite.java	2008-11-14 12:16:58 UTC (rev 81004)
@@ -39,11 +39,13 @@
 import org.jboss.test.deployers.vfs.structure.VFSStructureTestSuite;
 import org.jboss.test.deployers.vfs.structurebuilder.VFSStructureBuilderTestSuite;
 import org.jboss.test.deployers.vfs.xb.JBossXBDeployersTestSuite;
+import org.jboss.test.deployers.vfs.annotations.AnnotationScanningTestSuite;
 
 /**
  * Deployers VFS Test Suite.
  * 
  * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @author <a href="ales.justin at jboss.com">Ales Justin</a>
  * @version $Revision: 37459 $
  */
 public class DeployersVFSTestSuite extends TestSuite
@@ -72,6 +74,7 @@
       suite.addTest(MergeDeployerTestSuite.suite());
       suite.addTest(FaceletsTestSuite.suite());
       suite.addTest(ValidateDeployerTestSuite.suite());
+      suite.addTest(AnnotationScanningTestSuite.suite());
 
       return suite;
    }

Copied: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/annotations/AnnotationScanningTestSuite.java (from rev 80551, projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/classloader/ClassLoaderTestSuite.java)
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/annotations/AnnotationScanningTestSuite.java	                        (rev 0)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/annotations/AnnotationScanningTestSuite.java	2008-11-14 12:16:58 UTC (rev 81004)
@@ -0,0 +1,51 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.deployers.vfs.annotations;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import junit.textui.TestRunner;
+import org.jboss.test.deployers.vfs.annotations.test.AnnotationsScanningUnitTestCase;
+import org.jboss.test.deployers.vfs.annotations.test.AnnotationsScanningWithMetaDataUnitTestCase;
+
+/**
+ * AnnotationScanningTestSuite.
+ *
+ * @author <a href="ales.justin at jboss.org">Ales Justin</a>
+ */
+public class AnnotationScanningTestSuite extends TestSuite
+{
+   public static void main(String[] args)
+   {
+      TestRunner.run(suite());
+   }
+
+   public static Test suite()
+   {
+      TestSuite suite = new TestSuite("VFS Annotation Scanning Tests");
+
+      suite.addTest(AnnotationsScanningUnitTestCase.suite());
+      suite.addTest(AnnotationsScanningWithMetaDataUnitTestCase.suite());
+
+      return suite;
+   }
+}
\ No newline at end of file


Property changes on: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/annotations/AnnotationScanningTestSuite.java
___________________________________________________________________
Name: svn:mergeinfo
   + 

Deleted: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/annotations/support/jar/JarMarkOnClass.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/annotations/support/jar/JarMarkOnClass.java	2008-11-14 12:16:20 UTC (rev 81003)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/annotations/support/jar/JarMarkOnClass.java	2008-11-14 12:16:58 UTC (rev 81004)
@@ -1,32 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2006, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.test.deployers.vfs.annotations.support.jar;
-
-import org.jboss.test.deployers.vfs.annotations.support.Marked;
-
-/**
- * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
- */
- at Marked
-public class JarMarkOnClass extends JarMarkOnClassSuper
-{
-}
\ No newline at end of file

Added: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/annotations/support/jar/JarMarkOnClass.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/annotations/support/jar/JarMarkOnClass.java	                        (rev 0)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/annotations/support/jar/JarMarkOnClass.java	2008-11-14 12:16:58 UTC (rev 81004)
@@ -0,0 +1,32 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.deployers.vfs.annotations.support.jar;
+
+import org.jboss.test.deployers.vfs.annotations.support.Marked;
+
+/**
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+ at Marked
+public class JarMarkOnClass extends JarMarkOnClassSuper
+{
+}
\ No newline at end of file

Deleted: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/annotations/support/jar/JarMarkOnClassSuper.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/annotations/support/jar/JarMarkOnClassSuper.java	2008-11-14 12:16:20 UTC (rev 81003)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/annotations/support/jar/JarMarkOnClassSuper.java	2008-11-14 12:16:58 UTC (rev 81004)
@@ -1,29 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2006, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.test.deployers.vfs.annotations.support.jar;
-
-/**
- * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
- */
-public class JarMarkOnClassSuper extends JarMarkOnClassSuperAnnotated
-{
-}
\ No newline at end of file

Added: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/annotations/support/jar/JarMarkOnClassSuper.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/annotations/support/jar/JarMarkOnClassSuper.java	                        (rev 0)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/annotations/support/jar/JarMarkOnClassSuper.java	2008-11-14 12:16:58 UTC (rev 81004)
@@ -0,0 +1,31 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.deployers.vfs.annotations.support.jar;
+
+import org.jboss.test.deployers.vfs.annotations.support.jar.JarMarkOnClassSuperAnnotated;
+
+/**
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+public class JarMarkOnClassSuper extends JarMarkOnClassSuperAnnotated
+{
+}
\ No newline at end of file

Added: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/annotations/support/jar/impl/JarMarkOnClassImpl.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/annotations/support/jar/impl/JarMarkOnClassImpl.java	                        (rev 0)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/annotations/support/jar/impl/JarMarkOnClassImpl.java	2008-11-14 12:16:58 UTC (rev 81004)
@@ -0,0 +1,32 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.deployers.vfs.annotations.support.jar.impl;
+
+import org.jboss.test.deployers.vfs.annotations.support.Marked;
+
+/**
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+ at Marked
+public class JarMarkOnClassImpl
+{
+}

Deleted: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/annotations/support/war/WebMarkOnClass.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/annotations/support/war/WebMarkOnClass.java	2008-11-14 12:16:20 UTC (rev 81003)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/annotations/support/war/WebMarkOnClass.java	2008-11-14 12:16:58 UTC (rev 81004)
@@ -1,32 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2006, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.test.deployers.vfs.annotations.support.war;
-
-import org.jboss.test.deployers.vfs.annotations.support.Marked;
-
-/**
- * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
- */
- at Marked
-public class WebMarkOnClass extends WebMarkOnClassSuper
-{
-}
\ No newline at end of file

Added: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/annotations/support/war/WebMarkOnClass.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/annotations/support/war/WebMarkOnClass.java	                        (rev 0)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/annotations/support/war/WebMarkOnClass.java	2008-11-14 12:16:58 UTC (rev 81004)
@@ -0,0 +1,32 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.deployers.vfs.annotations.support.war;
+
+import org.jboss.test.deployers.vfs.annotations.support.Marked;
+
+/**
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+ at Marked
+public class WebMarkOnClass extends WebMarkOnClassSuper
+{
+}
\ No newline at end of file

Deleted: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/annotations/support/war/WebMarkOnClassSuper.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/annotations/support/war/WebMarkOnClassSuper.java	2008-11-14 12:16:20 UTC (rev 81003)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/annotations/support/war/WebMarkOnClassSuper.java	2008-11-14 12:16:58 UTC (rev 81004)
@@ -1,29 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2006, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.test.deployers.vfs.annotations.support.war;
-
-/**
- * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
- */
-public class WebMarkOnClassSuper extends WebMarkOnClassSuperAnnotated
-{
-}
\ No newline at end of file

Added: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/annotations/support/war/WebMarkOnClassSuper.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/annotations/support/war/WebMarkOnClassSuper.java	                        (rev 0)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/annotations/support/war/WebMarkOnClassSuper.java	2008-11-14 12:16:58 UTC (rev 81004)
@@ -0,0 +1,31 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.deployers.vfs.annotations.support.war;
+
+import org.jboss.test.deployers.vfs.annotations.support.war.WebMarkOnClassSuperAnnotated;
+
+/**
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+public class WebMarkOnClassSuper extends WebMarkOnClassSuperAnnotated
+{
+}
\ No newline at end of file

Added: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/annotations/support/war/impl/WebMarkOnClassImpl.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/annotations/support/war/impl/WebMarkOnClassImpl.java	                        (rev 0)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/annotations/support/war/impl/WebMarkOnClassImpl.java	2008-11-14 12:16:58 UTC (rev 81004)
@@ -0,0 +1,32 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.deployers.vfs.annotations.support.war.impl;
+
+import org.jboss.test.deployers.vfs.annotations.support.Marked;
+
+/**
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+ at Marked
+public class WebMarkOnClassImpl
+{
+}

Added: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/annotations/support/warlib/SomeUIClass.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/annotations/support/warlib/SomeUIClass.java	                        (rev 0)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/annotations/support/warlib/SomeUIClass.java	2008-11-14 12:16:58 UTC (rev 81004)
@@ -0,0 +1,32 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.deployers.vfs.annotations.support.warlib;
+
+import org.jboss.test.deployers.vfs.annotations.support.Marked;
+
+/**
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+ at Marked
+public class SomeUIClass
+{
+}

Copied: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/annotations/test/AbstractAnnotationsScanningUnitTest.java (from rev 80551, projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/annotations/test/AnnotationsScanningUnitTestCase.java)
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/annotations/test/AbstractAnnotationsScanningUnitTest.java	                        (rev 0)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/annotations/test/AbstractAnnotationsScanningUnitTest.java	2008-11-14 12:16:58 UTC (rev 81004)
@@ -0,0 +1,118 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.deployers.vfs.annotations.test;
+
+import java.util.Set;
+
+import org.jboss.deployers.spi.annotations.AnnotationEnvironment;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.test.deployers.BootstrapDeployersTest;
+import org.jboss.test.deployers.vfs.annotations.support.ext.External;
+import org.jboss.test.deployers.vfs.annotations.support.jar.JarMarkOnClass;
+import org.jboss.test.deployers.vfs.annotations.support.jar.impl.JarMarkOnClassImpl;
+import org.jboss.test.deployers.vfs.annotations.support.util.Util;
+import org.jboss.test.deployers.vfs.annotations.support.war.WebMarkOnClass;
+import org.jboss.test.deployers.vfs.annotations.support.war.impl.WebMarkOnClassImpl;
+import org.jboss.test.deployers.vfs.annotations.support.warlib.SomeUIClass;
+import org.jboss.virtual.AssembledDirectory;
+
+/**
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+public abstract class AbstractAnnotationsScanningUnitTest extends BootstrapDeployersTest
+{
+   protected AbstractAnnotationsScanningUnitTest(String name)
+   {
+      super(name);
+   }
+
+   public void testBasicScanning() throws Throwable
+   {
+      AssembledDirectory ear = createTopLevelWithUtil();
+
+      AssembledDirectory jar = ear.mkdir("simple.jar");
+      addPackage(jar, JarMarkOnClassImpl.class);
+      addPackage(jar, JarMarkOnClass.class);
+      addPath(jar, "/annotations/basic-scan/jar", "META-INF");
+
+      AssembledDirectory war = ear.mkdir("simple.war");
+      AssembledDirectory webinf = war.mkdir("WEB-INF");
+      AssembledDirectory classes = webinf.mkdir("classes");
+      addPackage(classes, WebMarkOnClassImpl.class);
+      addPackage(classes, WebMarkOnClass.class);
+      AssembledDirectory lib = webinf.mkdir("lib");
+      AssembledDirectory uijar = lib.mkdir("ui.jar");
+      addPackage(uijar, SomeUIClass.class);
+      addPath(war, "/annotations/basic-scan/web", "WEB-INF");
+
+      enableTrace("org.jboss.deployers");
+
+      DeploymentUnit unit = assertDeploy(ear);
+      assertEar(unit);
+      try
+      {
+         DeploymentUnit jarUnit = assertChild(unit, "simple.jar");
+         assertJar(jarUnit);
+         DeploymentUnit webUnit = assertChild(unit, "simple.war");
+         assertWar(webUnit);
+      }
+      finally
+      {
+         undeploy(unit);
+      }
+   }
+
+   protected abstract void assertEar(DeploymentUnit ear);
+   protected abstract void assertJar(DeploymentUnit jar);
+   protected abstract void assertWar(DeploymentUnit war);
+
+   @SuppressWarnings("unchecked")
+   protected void assertAnnotations(DeploymentUnit unit, int onClass, int onMethod, int onFiled)
+   {
+      AnnotationEnvironment env = unit.getAttachment(AnnotationEnvironment.class);
+      assertNotNull(env);
+
+      Set classes = env.classIsAnnotatedWith("org.jboss.test.deployers.vfs.annotations.support.Marked");
+      assertNotNull(classes);
+      assertEquals(onClass, classes.size());
+
+      Set methods = env.classHasMethodAnnotatedWith("org.jboss.test.deployers.vfs.annotations.support.Marked");
+      assertNotNull(methods);
+      assertEquals(onMethod, methods.size());
+
+      Set fields = env.classHasFieldAnnotatedWith("org.jboss.test.deployers.vfs.annotations.support.Marked");
+      assertNotNull(fields);
+      assertEquals(onFiled, fields.size());
+   }
+
+   protected AssembledDirectory createTopLevelWithUtil() throws Exception
+   {
+      AssembledDirectory topLevel = createAssembledDirectory("top-level.ear", "top-level.ear");
+      addPath(topLevel, "/annotations/basic-scan", "META-INF");
+      AssembledDirectory earLib = topLevel.mkdir("lib");
+      AssembledDirectory util = earLib.mkdir("util.jar");
+      addPackage(util, Util.class);
+      AssembledDirectory ext = earLib.mkdir("ext.jar");
+      addPackage(ext, External.class);
+      return topLevel;
+   }
+}
\ No newline at end of file


Property changes on: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/annotations/test/AbstractAnnotationsScanningUnitTest.java
___________________________________________________________________
Name: svn:mergeinfo
   + 

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/annotations/test/AnnotationsScanningUnitTestCase.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/annotations/test/AnnotationsScanningUnitTestCase.java	2008-11-14 12:16:20 UTC (rev 81003)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/annotations/test/AnnotationsScanningUnitTestCase.java	2008-11-14 12:16:58 UTC (rev 81004)
@@ -21,23 +21,13 @@
 */
 package org.jboss.test.deployers.vfs.annotations.test;
 
-import java.util.Set;
-
 import junit.framework.Test;
-import org.jboss.deployers.spi.annotations.AnnotationEnvironment;
 import org.jboss.deployers.structure.spi.DeploymentUnit;
-import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
-import org.jboss.test.deployers.BootstrapDeployersTest;
-import org.jboss.test.deployers.vfs.annotations.support.jar.JarMarkOnClass;
-import org.jboss.test.deployers.vfs.annotations.support.util.Util;
-import org.jboss.test.deployers.vfs.annotations.support.war.WebMarkOnClass;
-import org.jboss.test.deployers.vfs.annotations.support.ext.External;
-import org.jboss.virtual.AssembledDirectory;
 
 /**
  * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
  */
-public class AnnotationsScanningUnitTestCase extends BootstrapDeployersTest
+public class AnnotationsScanningUnitTestCase extends AbstractAnnotationsScanningUnitTest
 {
    public AnnotationsScanningUnitTestCase(String name)
    {
@@ -49,65 +39,18 @@
       return suite(AnnotationsScanningUnitTestCase.class);
    }
 
-   public void testBasicScanning() throws Throwable
+   protected void assertEar(DeploymentUnit ear)
    {
-      AssembledDirectory ear = createTopLevelWithUtil();
-
-      AssembledDirectory jar = ear.mkdir("simple.jar");
-      addPackage(jar, JarMarkOnClass.class);
-      addPath(jar, "/annotations/basic-scan/jar", "META-INF");
-
-      AssembledDirectory war = ear.mkdir("simple.war");
-      AssembledDirectory webinf = war.mkdir("WEB-INF");
-      AssembledDirectory classes = webinf.mkdir("classes");
-      addPackage(classes, WebMarkOnClass.class);
-      addPath(war, "/annotations/basic-scan/web", "WEB-INF");
-
-      enableTrace("org.jboss.deployers");
-
-      VFSDeploymentUnit unit = assertDeploy(ear);
-      assertAnnotations(unit, 1, 1, 1);
-      try
-      {
-         DeploymentUnit jarUnit = assertChild(unit, "simple.jar");
-         assertAnnotations(jarUnit, 2, 1, 1);
-         DeploymentUnit webUnit = assertChild(unit, "simple.war");
-         assertAnnotations(webUnit, 2, 1, 1);
-      }
-      finally
-      {
-         undeploy(unit);
-      }
+      assertAnnotations(ear, 1, 1, 1);
    }
 
-   @SuppressWarnings("unchecked")
-   protected void assertAnnotations(DeploymentUnit unit, int onClass, int onMethod, int onFiled)
+   protected void assertJar(DeploymentUnit jar)
    {
-      AnnotationEnvironment env = unit.getAttachment(AnnotationEnvironment.class);
-      assertNotNull(env);
-
-      Set classes = env.classIsAnnotatedWith("org.jboss.test.deployers.vfs.annotations.support.Marked");
-      assertNotNull(classes);
-      assertEquals(onClass, classes.size());
-
-      Set methods = env.classHasMethodAnnotatedWith("org.jboss.test.deployers.vfs.annotations.support.Marked");
-      assertNotNull(methods);
-      assertEquals(onMethod, methods.size());
-
-      Set fields = env.classHasFieldAnnotatedWith("org.jboss.test.deployers.vfs.annotations.support.Marked");
-      assertNotNull(fields);
-      assertEquals(onFiled, fields.size());
+      assertAnnotations(jar, 3, 1, 1);
    }
 
-   protected AssembledDirectory createTopLevelWithUtil() throws Exception
+   protected void assertWar(DeploymentUnit war)
    {
-      AssembledDirectory topLevel = createAssembledDirectory("top-level.ear", "top-level.ear");
-      addPath(topLevel, "/annotations/basic-scan", "META-INF");
-      AssembledDirectory earLib = topLevel.mkdir("lib");
-      AssembledDirectory util = earLib.mkdir("util.jar");
-      addPackage(util, Util.class);
-      AssembledDirectory ext = earLib.mkdir("ext.jar");
-      addPackage(ext, External.class);
-      return topLevel;
+      assertAnnotations(war, 4, 1, 1);
    }
 }

Copied: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/annotations/test/AnnotationsScanningWithMetaDataUnitTestCase.java (from rev 80551, projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/annotations/test/AnnotationsScanningUnitTestCase.java)
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/annotations/test/AnnotationsScanningWithMetaDataUnitTestCase.java	                        (rev 0)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/annotations/test/AnnotationsScanningWithMetaDataUnitTestCase.java	2008-11-14 12:16:58 UTC (rev 81004)
@@ -0,0 +1,56 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.deployers.vfs.annotations.test;
+
+import junit.framework.Test;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+
+/**
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+public class AnnotationsScanningWithMetaDataUnitTestCase extends AbstractAnnotationsScanningUnitTest
+{
+   public AnnotationsScanningWithMetaDataUnitTestCase(String name)
+   {
+      super(name);
+   }
+
+   public static Test suite()
+   {
+      return suite(AnnotationsScanningWithMetaDataUnitTestCase.class);
+   }
+
+   protected void assertEar(DeploymentUnit ear)
+   {
+      assertAnnotations(ear, 1, 1, 1);
+   }
+
+   protected void assertJar(DeploymentUnit jar)
+   {
+      assertAnnotations(jar, 1, 0, 0);
+   }
+
+   protected void assertWar(DeploymentUnit war)
+   {
+      assertAnnotations(war, 1, 0, 0);
+   }
+}
\ No newline at end of file


Property changes on: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/annotations/test/AnnotationsScanningWithMetaDataUnitTestCase.java
___________________________________________________________________
Name: svn:mergeinfo
   + 

Added: projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/annotations/basic-scan/META-INF/jboss-scanning.xml
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/annotations/basic-scan/META-INF/jboss-scanning.xml	                        (rev 0)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/annotations/basic-scan/META-INF/jboss-scanning.xml	2008-11-14 12:16:58 UTC (rev 81004)
@@ -0,0 +1,5 @@
+<scanning xmlns="urn:jboss:scanning:1.0">
+  <path name="lib/util.jar">
+    <include name="org.jboss.test.deployers.vfs.annotations.support.util"/>
+  </path>
+</scanning>

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/annotations/basic-scan/jar/META-INF/MANIFEST.MF
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/annotations/basic-scan/jar/META-INF/MANIFEST.MF	2008-11-14 12:16:20 UTC (rev 81003)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/annotations/basic-scan/jar/META-INF/MANIFEST.MF	2008-11-14 12:16:58 UTC (rev 81004)
@@ -1,3 +1,3 @@
 Manifest-Version: 1.0
 Created-By: hand
-Class-Path: lib/util.jar
+Class-Path: lib/util.jar, lib/ext.jar

Added: projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/annotations/basic-scan/jar/META-INF/jboss-scanning.xml
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/annotations/basic-scan/jar/META-INF/jboss-scanning.xml	                        (rev 0)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/annotations/basic-scan/jar/META-INF/jboss-scanning.xml	2008-11-14 12:16:58 UTC (rev 81004)
@@ -0,0 +1,5 @@
+<scanning xmlns="urn:jboss:scanning:1.0">
+  <path name="simple.jar">
+    <include name="org.jboss.test.deployers.vfs.annotations.support.jar.impl"/>
+  </path>
+</scanning>

Added: projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/annotations/basic-scan/web/WEB-INF/jboss-scanning.xml
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/annotations/basic-scan/web/WEB-INF/jboss-scanning.xml	                        (rev 0)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/annotations/basic-scan/web/WEB-INF/jboss-scanning.xml	2008-11-14 12:16:58 UTC (rev 81004)
@@ -0,0 +1,6 @@
+<scanning xmlns="urn:jboss:scanning:1.0">
+  <path name="simple.war">
+    <exclude name="org.jboss.test.deployers.vfs.annotations.support.war"/>
+    <exclude name="org.jboss.test.deployers.vfs.annotations.support.warlib"/>
+  </path>
+</scanning>

Copied: projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/org/jboss/test/deployers/vfs/annotations/test/AnnotationsScanningWithMetaDataUnitTestCase.xml (from rev 80551, projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/org/jboss/test/deployers/vfs/annotations/test/AnnotationsScanningUnitTestCase.xml)
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/org/jboss/test/deployers/vfs/annotations/test/AnnotationsScanningWithMetaDataUnitTestCase.xml	                        (rev 0)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/org/jboss/test/deployers/vfs/annotations/test/AnnotationsScanningWithMetaDataUnitTestCase.xml	2008-11-14 12:16:58 UTC (rev 81004)
@@ -0,0 +1,14 @@
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+  <bean name="EarStructure" class="org.jboss.test.deployers.vfs.structure.ear.support.MockEarStructureDeployer"/>
+  <bean name="WarStructure" class="org.jboss.deployers.vfs.plugins.structure.war.WARStructure"/>
+
+  <bean name="ScanningMDDeployer" class="org.jboss.deployers.vfs.plugins.annotations.ScanningMetaDataDeployer"/>
+
+  <bean name="AnnEnvDeployer" class="org.jboss.deployers.vfs.plugins.annotations.FilteredAnnotationEnvironmentDeployer">
+    <property name="filter">
+      <bean class="org.jboss.deployers.vfs.plugins.annotations.ScanningDeploymentUnitFilter"/>
+    </property>
+  </bean>
+
+</deployment>


Property changes on: projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/org/jboss/test/deployers/vfs/annotations/test/AnnotationsScanningWithMetaDataUnitTestCase.xml
___________________________________________________________________
Name: svn:mergeinfo
   + 

Copied: projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/helpers/Base2VFSBridgeDeploymentUnitFilter.java (from rev 80791, projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/helpers/BridgeDeploymentUnitFilter.java)
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/helpers/Base2VFSBridgeDeploymentUnitFilter.java	                        (rev 0)
+++ projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/helpers/Base2VFSBridgeDeploymentUnitFilter.java	2008-11-14 12:16:58 UTC (rev 81004)
@@ -0,0 +1,43 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.deployers.vfs.spi.structure.helpers;
+
+import org.jboss.deployers.structure.spi.DeploymentUnitFilter;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnitFilter;
+import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
+
+/**
+ * Bridge deployment unit filter.
+ * 
+ * It implements both, plain deployment unit and vfs deployment unit filters.
+ * It delegates work to vfs du filter if du is vfs instance.
+ *
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+public abstract class Base2VFSBridgeDeploymentUnitFilter implements DeploymentUnitFilter, VFSDeploymentUnitFilter
+{
+   public boolean accepts(DeploymentUnit unit)
+   {
+      return (unit instanceof VFSDeploymentUnit) && accepts((VFSDeploymentUnit)unit);
+   }
+}

Deleted: projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/helpers/BridgeDeploymentUnitFilter.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/helpers/BridgeDeploymentUnitFilter.java	2008-11-14 12:16:20 UTC (rev 81003)
+++ projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/helpers/BridgeDeploymentUnitFilter.java	2008-11-14 12:16:58 UTC (rev 81004)
@@ -1,43 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2006, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.deployers.vfs.spi.structure.helpers;
-
-import org.jboss.deployers.structure.spi.DeploymentUnitFilter;
-import org.jboss.deployers.structure.spi.DeploymentUnit;
-import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnitFilter;
-import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
-
-/**
- * Bridge deployment unit filter.
- * 
- * It implements both, plain deployment unit and vfs deployment unit filters.
- * It delegates work to vfs du filter if du is vfs instance.
- *
- * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
- */
-public abstract class BridgeDeploymentUnitFilter implements DeploymentUnitFilter, VFSDeploymentUnitFilter
-{
-   public boolean accepts(DeploymentUnit unit)
-   {
-      return (unit instanceof VFSDeploymentUnit) && accepts((VFSDeploymentUnit)unit);
-   }
-}

Copied: projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/helpers/VFS2BaseBridgeDeploymentUnitFilter.java (from rev 80791, projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/helpers/BridgeDeploymentUnitFilter.java)
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/helpers/VFS2BaseBridgeDeploymentUnitFilter.java	                        (rev 0)
+++ projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/helpers/VFS2BaseBridgeDeploymentUnitFilter.java	2008-11-14 12:16:58 UTC (rev 81004)
@@ -0,0 +1,56 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.deployers.vfs.spi.structure.helpers;
+
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.deployers.structure.spi.DeploymentUnitFilter;
+import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnitFilter;
+import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
+
+/**
+ * Bridge deployment unit filter.
+ *
+ * It implements both, plain deployment unit and vfs deployment unit filters.
+ * It delegates work to base du accepts method for both accepts.
+ *
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+public abstract class VFS2BaseBridgeDeploymentUnitFilter implements DeploymentUnitFilter, VFSDeploymentUnitFilter
+{
+   /**
+    * Do we accept this unit.
+    *
+    * @param unit the deployment unit
+    * @return true if accepted, false otherwise
+    */
+   protected abstract boolean doAccepts(DeploymentUnit unit);
+
+   public boolean accepts(VFSDeploymentUnit unit)
+   {
+      return doAccepts(unit);
+   }
+
+   public boolean accepts(DeploymentUnit unit)
+   {
+      return doAccepts(unit);
+   }
+}
\ No newline at end of file


Property changes on: projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/helpers/VFS2BaseBridgeDeploymentUnitFilter.java
___________________________________________________________________
Name: svn:mergeinfo
   + 

Modified: projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/helpers/VirtualFileDeploymentUnitFilter.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/helpers/VirtualFileDeploymentUnitFilter.java	2008-11-14 12:16:20 UTC (rev 81003)
+++ projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/helpers/VirtualFileDeploymentUnitFilter.java	2008-11-14 12:16:58 UTC (rev 81004)
@@ -32,7 +32,7 @@
  *
  * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
  */
-public class VirtualFileDeploymentUnitFilter extends BridgeDeploymentUnitFilter
+public class VirtualFileDeploymentUnitFilter extends Base2VFSBridgeDeploymentUnitFilter
 {
    private VirtualFileFilter filter;
 




More information about the jboss-cvs-commits mailing list