[webbeans-commits] Webbeans SVN: r88 - in ri/trunk/webbeans-ri: src/main/java/org/jboss/webbeans and 8 other directories.

webbeans-commits at lists.jboss.org webbeans-commits at lists.jboss.org
Sun Aug 10 11:02:38 EDT 2008


Author: pete.muir at jboss.org
Date: 2008-08-10 11:02:38 -0400 (Sun, 10 Aug 2008)
New Revision: 88

Added:
   ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/scannotation/
   ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/scannotation/AnnotationDB.java
   ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/scannotation/ClasspathUrlFinder.java
   ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/scannotation/FileIterator.java
   ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/scannotation/InputStreamWrapper.java
   ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/scannotation/IteratorFactory.java
   ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/scannotation/JarIterator.java
   ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/broken/
   ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/broken/StereotypeWithBindingTypes.java
   ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/broken/StereotypeWithNonEmptyNamed.java
   ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/broken/StereotypeWithTooManyDeploymentTypes.java
   ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/broken/StereotypeWithTooManyScopeTypes.java
   ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/components/broken/
   ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/components/broken/ComponentWithTooManyDeploymentTypes.java
Removed:
   ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/StereotypeWithBindingTypes.java
   ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/StereotypeWithNonEmptyNamed.java
   ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/StereotypeWithTooManyDeploymentTypes.java
   ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/StereotypeWithTooManyScopeTypes.java
   ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/components/ComponentWithTooManyDeploymentTypes.java
Modified:
   ri/trunk/webbeans-ri/pom.xml
   ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/deployment/DeploymentStrategy.java
   ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/AbstractComponentModel.java
   ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/StereotypeModel.java
   ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ComponentMetaModelTest.java
   ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/DeploymentStrategyTest.java
   ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/StereotypeMetaModelTest.java
Log:
Remove scannotation, fix deployment, move purposefully broken stuff into it's own package

Modified: ri/trunk/webbeans-ri/pom.xml
===================================================================
--- ri/trunk/webbeans-ri/pom.xml	2008-08-10 15:00:47 UTC (rev 87)
+++ ri/trunk/webbeans-ri/pom.xml	2008-08-10 15:02:38 UTC (rev 88)
@@ -37,17 +37,10 @@
       </dependency>
       
       <dependency>
-         <groupId>org.scannotation</groupId>
-         <artifactId>scannotation</artifactId>
-      </dependency>
-      
-      <dependency>
          <groupId>javassist</groupId>
          <artifactId>javassist</artifactId>
       </dependency>
 
-      
-
    </dependencies>
    
 </project>
\ No newline at end of file

Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/deployment/DeploymentStrategy.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/deployment/DeploymentStrategy.java	2008-08-10 15:00:47 UTC (rev 87)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/deployment/DeploymentStrategy.java	2008-08-10 15:02:38 UTC (rev 88)
@@ -1,14 +1,13 @@
 package org.jboss.webbeans.deployment;
 
 import java.net.URL;
-import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.HashMap;
-import java.util.List;
 import java.util.Map;
 import java.util.Set;
 import java.util.logging.Logger;
 
+import javassist.bytecode.ClassFile;
+
 import javax.webbeans.Container;
 import javax.webbeans.DeploymentType;
 import javax.webbeans.Stereotype;
@@ -17,12 +16,12 @@
 import org.jboss.webbeans.ContainerImpl;
 import org.jboss.webbeans.model.SimpleComponentModel;
 import org.jboss.webbeans.model.StereotypeModel;
+import org.jboss.webbeans.scannotation.AnnotationDB;
+import org.jboss.webbeans.scannotation.ClasspathUrlFinder;
 import org.jboss.webbeans.util.ClassAnnotatedItem;
 import org.jboss.webbeans.util.LoggerUtil;
 import org.jboss.webbeans.util.MutableAnnotatedItem;
 import org.jboss.webbeans.util.Reflections;
-import org.scannotation.AnnotationDB;
-import org.scannotation.ClasspathUrlFinder;
 
 /**
  * @author Pete Muir
@@ -36,6 +35,8 @@
    private ClassLoader classLoader;
    private ContainerImpl container;
    
+   public static String[] DEFAULT_IGNORED_PACKAGES = {"java", "com.sun", "sun", "javasssit"};
+   
    public DeploymentStrategy(ClassLoader classLoader, Container container)
    {
       this.classLoader = classLoader;
@@ -47,11 +48,41 @@
       
       this.container = (ContainerImpl) container;
    }
+ 
    
-   public void scan(URL[] urls)
+   public void scan(URL[] urls, final String ... ignoredPackages)
    {
            
-      AnnotationDB db = new AnnotationDB();
+      AnnotationDB db = new AnnotationDB()
+      {
+         @Override
+         protected boolean ignoreScan(ClassFile classFile)
+         {
+            for (String ignoredPackage : DEFAULT_IGNORED_PACKAGES)
+            {
+               if (classFile.getName().startsWith(ignoredPackage))
+               {
+                  return true;
+               }
+            }
+            for (String ignoredPackage : ignoredPackages)
+            {
+               if (classFile.getName().startsWith(ignoredPackage))
+               {
+                  return true;
+               }
+            }
+            if (classFile.getName().startsWith("javax.webbeans"))
+            {
+               return false;
+            }
+            else if (classFile.getName().startsWith("javax"))
+            {
+               return true;
+            }
+            return false;
+         }
+      };
       try
       {
          db.scanArchives(urls);
@@ -70,46 +101,64 @@
    private void addStereotypes(Map<String, Set<String>> index)
    {
       Set<String> stereotypeClassNames = index.get(Stereotype.class.getName());
-      try
+      if (stereotypeClassNames != null)
       {
-         for (String className : stereotypeClassNames)
+         try
          {
-            log.info("Creating stereotype " + className);
-            StereotypeModel stereotypeModel = new StereotypeModel(new ClassAnnotatedItem(Reflections.classForName(className)));
-            container.getStereotypeManager().addStereotype(stereotypeModel);
-            log.info("Stereotype: " + stereotypeModel);
+            for (String className : stereotypeClassNames)
+            {
+               log.info("Creating stereotype " + className);
+               Class<?> stereotypeClass = Reflections.classForName(className);
+               if (stereotypeClass.isAnnotation())
+               {
+                  StereotypeModel stereotypeModel = new StereotypeModel(new ClassAnnotatedItem(stereotypeClass));
+                  container.getStereotypeManager().addStereotype(stereotypeModel);
+                  log.info("Stereotype: " + stereotypeModel);
+               }
+               
+            }
          }
+         catch (Exception e) 
+         {
+            throw new RuntimeException(e);
+         }
       }
-      catch (Exception e) 
-      {
-         throw new RuntimeException(e);
-      }
    }
    
    private void addComponents(Map<String, Set<String>> index)
    {
       Set<String> annotationNames = index.get(DeploymentType.class.getName());
-      
-      try
+      if (annotationNames != null)
       {
-         for (String annotationType : annotationNames)
+         try
          {
-            Set<String> classNames = index.get(annotationType);
-            for (String className : classNames)
+            for (String annotationType : annotationNames)
             {
-               log.finest("Creating componnt" + className);
-               SimpleComponentModel componentModel = new SimpleComponentModel(
-                     new ClassAnnotatedItem(Reflections.classForName(className)), 
-                     new MutableAnnotatedItem(null, new HashMap()), container);  
-               container.addComponent(new ComponentInstanceImpl(componentModel));
-               log.info("Web Bean: " + componentModel);
+               Set<String> classNames = index.get(annotationType);
+               if (classNames != null)
+               {
+               
+                  for (String className : classNames)
+                  {
+                     log.finest("Creating componnt" + className);
+                     Class<?> componentClass = Reflections.classForName(className);
+                     if (!componentClass.isAnnotation())
+                     {
+                        SimpleComponentModel componentModel = new SimpleComponentModel(
+                              new ClassAnnotatedItem(componentClass), 
+                              new MutableAnnotatedItem(null, new HashMap()), container);  
+                        container.addComponent(new ComponentInstanceImpl(componentModel));
+                        log.info("Web Bean: " + componentModel);
+                     }
+                  }
+               }
             }
          }
+         catch (ClassNotFoundException ex)
+         {
+            throw new RuntimeException(ex);
+         }
       }
-      catch (ClassNotFoundException ex)
-      {
-         throw new RuntimeException(ex);
-      }
    }
    
    public void scan()

Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/AbstractComponentModel.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/AbstractComponentModel.java	2008-08-10 15:00:47 UTC (rev 87)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/AbstractComponentModel.java	2008-08-10 15:02:38 UTC (rev 88)
@@ -157,7 +157,7 @@
          
          if (deploymentTypes.size() > 1)
          {
-            throw new RuntimeException("At most one deployment type may be specified (" + deploymentTypes + " are specified)");
+            throw new RuntimeException("At most one deployment type may be specified (" + deploymentTypes + " are specified) on " + annotatedItem.getAnnotatedClass());
          }
          if (deploymentTypes.size() == 1)
          {
@@ -415,5 +415,11 @@
    }
    
    public abstract ComponentConstructor<T> getConstructor();
+   
+   @Override
+   public String toString()
+   {
+      return "SimpleComponentModel[" + type.getName() + "]";
+   }
 
 }

Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/StereotypeModel.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/StereotypeModel.java	2008-08-10 15:00:47 UTC (rev 87)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/StereotypeModel.java	2008-08-10 15:02:38 UTC (rev 88)
@@ -50,7 +50,7 @@
       Set<Annotation> bindingTypes = annotatedClass.getAnnotations(BindingType.class);
       if (bindingTypes.size() > 0)
       {
-         throw new RuntimeException("Cannot declare binding types on a stereotpe");
+         throw new RuntimeException("Cannot declare binding types on a stereotype " + annotatedClass);
       }
    }
    
@@ -63,7 +63,7 @@
       }
       else
       {
-         throw new RuntimeException("@Stereotype can only be applied to an annotation");
+         throw new RuntimeException("@Stereotype can only be applied to an annotation, it was applied to " + annotatedClass);
       }
    }
 
@@ -98,7 +98,7 @@
       {
          if (!"".equals(annotatedElement.getAnnotation(Named.class).value()))
          {
-            throw new RuntimeException("Cannot specify a value for a @Named stereotype");
+            throw new RuntimeException("Cannot specify a value for a @Named stereotype " + annotatedElement);
          }
          componentNameDefaulted = true;
       }
@@ -109,7 +109,7 @@
       Set<Annotation> scopeTypes = annotatedElement.getAnnotations(ScopeType.class);
       if (scopeTypes.size() > 1)
       {
-         throw new RuntimeException("At most one scope type may be specified");
+         throw new RuntimeException("At most one scope type may be specified for " + annotatedElement);
       }
       else if (scopeTypes.size() == 1)
       {
@@ -122,7 +122,7 @@
       Set<Annotation> deploymentTypes = annotatedElement.getAnnotations(DeploymentType.class);
       if (deploymentTypes.size() > 1)
       {
-         throw new RuntimeException("At most one deployment type may be specified");
+         throw new RuntimeException("At most one deployment type may be specified on " + annotatedElement);
       }
       else if (deploymentTypes.size() == 1)
       {
@@ -192,7 +192,7 @@
    @Override
    public String toString()
    {
-      return "[" + stereotypeClass + "]";
+      return "StereotypeModel[" + stereotypeClass.getName() + "]";
    }
    
 }

Added: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/scannotation/AnnotationDB.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/scannotation/AnnotationDB.java	                        (rev 0)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/scannotation/AnnotationDB.java	2008-08-10 15:02:38 UTC (rev 88)
@@ -0,0 +1,397 @@
+package org.jboss.webbeans.scannotation;
+
+
+import javassist.bytecode.AnnotationsAttribute;
+import javassist.bytecode.ClassFile;
+import javassist.bytecode.FieldInfo;
+import javassist.bytecode.MethodInfo;
+import javassist.bytecode.ParameterAnnotationsAttribute;
+import javassist.bytecode.annotation.Annotation;
+
+import java.io.BufferedInputStream;
+import java.io.DataInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.PrintWriter;
+import java.io.Serializable;
+import java.net.URL;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * The class allows you to scan an arbitrary set of "archives" for .class files.  These class files
+ * are parsed to see what annotations they use.  Two indexes are created.  The javax, java, sun, com.sun, and javassist
+ * packages will not be scanned by default.
+ * <p/>
+ * One is a map of annotations and what classes
+ * use those annotations.   This could be used, for example, by an EJB deployer to find all the EJBs contained
+ * in the archive
+ * <p/>
+ * Another is a mpa of classes and what annotations those classes use.
+ *
+ * @author <a href="mailto:bill at burkecentral.com">Bill Burke</a>
+ * @author Pete Muir
+ * @version $Revision: 1 $
+ */
+public abstract class AnnotationDB implements Serializable
+{
+   protected Map<String, Set<String>> annotationIndex = new HashMap<String, Set<String>>();
+   protected Map<String, Set<String>> implementsIndex = new HashMap<String, Set<String>>();
+   protected Map<String, Set<String>> classIndex = new HashMap<String, Set<String>>();
+
+   protected transient boolean scanClassAnnotations = true;
+   protected transient boolean scanMethodAnnotations = true;
+   protected transient boolean scanParameterAnnotations = true;
+   protected transient boolean scanFieldAnnotations = true;
+
+   public class CrossReferenceException extends Exception
+   {
+      private Set<String> unresolved;
+
+      public CrossReferenceException(Set<String> unresolved)
+      {
+         this.unresolved = unresolved;
+      }
+
+      public Set<String> getUnresolved()
+      {
+         return unresolved;
+      }
+   }
+
+   /**
+    * This method will cross reference annotations in the annotation index with any meta-annotations that they have
+    * and create additional entries as needed.  For example:
+    *
+    * @HttpMethod("GET") public @interface GET {}
+    * <p/>
+    * The HttpMethod index will have additional classes added to it for any classes annotated with annotations that
+    * have the HttpMethod meta-annotation.
+    * <p/>
+    * WARNING: If the annotation class has not already been scaned, this method will load all annotation classes indexed
+    * as a resource so they must be in your classpath
+    */
+   public void crossReferenceMetaAnnotations() throws CrossReferenceException
+   {
+      Set<String> unresolved = new HashSet<String>();
+
+      Set<String> index = new HashSet<String>();
+      index.addAll(annotationIndex.keySet());
+
+      for (String annotation : index)
+      {
+         if (classIndex.containsKey(annotation))
+         {
+            for (String xref : classIndex.get(annotation))
+            {
+               annotationIndex.get(xref).addAll(annotationIndex.get(annotation));
+            }
+            continue;
+         }
+         InputStream bits = Thread.currentThread().getContextClassLoader().getResourceAsStream(annotation.replace('.', '/') + ".class");
+         if (bits == null)
+         {
+            unresolved.add(annotation);
+            continue;
+         }
+         boolean scanned = false;
+         try
+         {
+            scanned = scanClass(bits);
+         }
+         catch (IOException e)
+         {
+            unresolved.add(annotation);
+         }
+         if (scanned)
+         {
+            for (String xref : classIndex.get(annotation))
+            {
+               annotationIndex.get(xref).addAll(annotationIndex.get(annotation));
+            }
+         }
+
+      }
+      if (unresolved.size() > 0) throw new CrossReferenceException(unresolved);
+   }
+
+   /**
+    * Sometimes you want to see if a particular class implements an interface with certain annotations
+    * After you have loaded all your classpaths with the scanArchive() method, call this method to cross reference
+    * a class's implemented interfaces.  The cross references will be added to the annotationIndex and
+    * classIndex indexes
+    *
+    * @param ignoredPackages var arg list of packages to ignore
+    * @throws CrossReferenceException an Exception thrown if referenced interfaces haven't been scanned
+    */
+   public void crossReferenceImplementedInterfaces() throws CrossReferenceException
+   {
+      Set<String> unresolved = new HashSet<String>();
+      for (String clazz : implementsIndex.keySet())
+      {
+         Set<String> intfs = implementsIndex.get(clazz);
+         for (String intf : intfs)
+         {
+
+            Set<String> xrefAnnotations = classIndex.get(intf);
+            if (xrefAnnotations == null)
+            {
+               unresolved.add(intf);
+            }
+            else
+            {
+               Set<String> classAnnotations = classIndex.get(clazz);
+               if (classAnnotations == null)
+               {
+                  classIndex.put(clazz, xrefAnnotations);
+               }
+               else classAnnotations.addAll(xrefAnnotations);
+               for (String annotation : xrefAnnotations)
+               {
+                  Set<String> classes = annotationIndex.get(annotation);
+                  classes.add(clazz);
+               }
+            }
+         }
+      }
+      if (unresolved.size() > 0) throw new CrossReferenceException(unresolved);
+
+   }
+   
+   protected abstract boolean ignoreScan(ClassFile classFile);
+
+   /**
+    * returns a map keyed by the fully qualified string name of a annotation class.  The Set returne is
+    * a list of classes that use that annotation somehow.
+    */
+   public Map<String, Set<String>> getAnnotationIndex()
+   {
+      return annotationIndex;
+   }
+
+   /**
+    * returns a map keyed by the list of classes scanned.  The value set returned is a list of annotations
+    * used by that class.
+    */
+   public Map<String, Set<String>> getClassIndex()
+   {
+      return classIndex;
+   }
+
+
+   /**
+    * Whether or not you want AnnotationDB to scan for class level annotations
+    *
+    * @param scanClassAnnotations
+    */
+   public void setScanClassAnnotations(boolean scanClassAnnotations)
+   {
+      this.scanClassAnnotations = scanClassAnnotations;
+   }
+
+   /**
+    * Wheter or not you want AnnotationDB to scan for method level annotations
+    *
+    * @param scanMethodAnnotations
+    */
+   public void setScanMethodAnnotations(boolean scanMethodAnnotations)
+   {
+      this.scanMethodAnnotations = scanMethodAnnotations;
+   }
+
+   /**
+    * Whether or not you want AnnotationDB to scan for parameter level annotations
+    *
+    * @param scanParameterAnnotations
+    */
+   public void setScanParameterAnnotations(boolean scanParameterAnnotations)
+   {
+      this.scanParameterAnnotations = scanParameterAnnotations;
+   }
+
+   /**
+    * Whether or not you want AnnotationDB to scan for parameter level annotations
+    *
+    * @param scanFieldAnnotations
+    */
+   public void setScanFieldAnnotations(boolean scanFieldAnnotations)
+   {
+      this.scanFieldAnnotations = scanFieldAnnotations;
+   }
+
+
+   /**
+    * Scan a url that represents an "archive"  this is a classpath directory or jar file
+    *
+    * @param urls variable list of URLs to scan as archives
+    * @throws IOException
+    */
+   public void scanArchives(URL... urls) throws IOException
+   {
+      for (URL url : urls)
+      {
+         Iterator<InputStream> it = IteratorFactory.create(url);
+
+         InputStream stream;
+         while ((stream = it.next()) != null) scanClass(stream);
+      }
+
+   }
+
+   /**
+    * Parse a .class file for annotations
+    *
+    * @param bits input stream pointing to .class file bits
+    * @throws IOException
+    */
+   public boolean scanClass(InputStream bits) throws IOException
+   {
+      DataInputStream dstream = new DataInputStream(new BufferedInputStream(bits));
+      ClassFile cf = null;
+      try
+      {
+         cf = new ClassFile(dstream);
+         if (!ignoreScan(cf))
+         {
+            classIndex.put(cf.getName(), new HashSet<String>());
+            if (scanClassAnnotations) ;
+            scanClass(cf);
+            if (scanMethodAnnotations || scanParameterAnnotations) scanMethods(cf);
+            if (scanFieldAnnotations) scanFields(cf);
+   
+            // create an index of interfaces the class implements
+            if (cf.getInterfaces() != null)
+            {
+               Set<String> intfs = new HashSet<String>();
+               for (String intf : cf.getInterfaces()) intfs.add(intf);
+               implementsIndex.put(cf.getName(), intfs);
+            }
+            return true;
+         }
+         else
+         {
+            return false;
+         }
+
+      }
+      finally
+      {
+         dstream.close();
+         bits.close();
+      }
+   }
+
+   protected void scanClass(ClassFile cf)
+   {
+      String className = cf.getName();
+      AnnotationsAttribute visible = (AnnotationsAttribute) cf.getAttribute(AnnotationsAttribute.visibleTag);
+      AnnotationsAttribute invisible = (AnnotationsAttribute) cf.getAttribute(AnnotationsAttribute.invisibleTag);
+
+      if (visible != null) populate(visible.getAnnotations(), className);
+      if (invisible != null) populate(invisible.getAnnotations(), className);
+   }
+
+   /**
+    * Scanns both the method and its parameters for annotations.
+    *
+    * @param cf
+    */
+   protected void scanMethods(ClassFile cf)
+   {
+      List methods = cf.getMethods();
+      if (methods == null) return;
+      for (Object obj : methods)
+      {
+         MethodInfo method = (MethodInfo) obj;
+         if (scanMethodAnnotations)
+         {
+            AnnotationsAttribute visible = (AnnotationsAttribute) method.getAttribute(AnnotationsAttribute.visibleTag);
+            AnnotationsAttribute invisible = (AnnotationsAttribute) method.getAttribute(AnnotationsAttribute.invisibleTag);
+
+            if (visible != null) populate(visible.getAnnotations(), cf.getName());
+            if (invisible != null) populate(invisible.getAnnotations(), cf.getName());
+         }
+         if (scanParameterAnnotations)
+         {
+            ParameterAnnotationsAttribute paramsVisible = (ParameterAnnotationsAttribute) method.getAttribute(ParameterAnnotationsAttribute.visibleTag);
+            ParameterAnnotationsAttribute paramsInvisible = (ParameterAnnotationsAttribute) method.getAttribute(ParameterAnnotationsAttribute.invisibleTag);
+
+            if (paramsVisible != null && paramsVisible.getAnnotations() != null)
+            {
+               for (Annotation[] anns : paramsVisible.getAnnotations())
+               {
+                  populate(anns, cf.getName());
+               }
+            }
+            if (paramsInvisible != null && paramsInvisible.getAnnotations() != null)
+            {
+               for (Annotation[] anns : paramsInvisible.getAnnotations())
+               {
+                  populate(anns, cf.getName());
+               }
+            }
+         }
+      }
+   }
+
+   protected void scanFields(ClassFile cf)
+   {
+      List fields = cf.getFields();
+      if (fields == null) return;
+      for (Object obj : fields)
+      {
+         FieldInfo field = (FieldInfo) obj;
+         AnnotationsAttribute visible = (AnnotationsAttribute) field.getAttribute(AnnotationsAttribute.visibleTag);
+         AnnotationsAttribute invisible = (AnnotationsAttribute) field.getAttribute(AnnotationsAttribute.invisibleTag);
+
+         if (visible != null) populate(visible.getAnnotations(), cf.getName());
+         if (invisible != null) populate(invisible.getAnnotations(), cf.getName());
+      }
+
+
+   }
+
+   protected void populate(Annotation[] annotations, String className)
+   {
+      if (annotations == null) return;
+      Set<String> classAnnotations = classIndex.get(className);
+      for (Annotation ann : annotations)
+      {
+         Set<String> classes = annotationIndex.get(ann.getTypeName());
+         if (classes == null)
+         {
+            classes = new HashSet<String>();
+            annotationIndex.put(ann.getTypeName(), classes);
+         }
+         classes.add(className);
+         classAnnotations.add(ann.getTypeName());
+      }
+   }
+
+   /**
+    * Prints out annotationIndex
+    *
+    * @param writer
+    */
+   public void outputAnnotationIndex(PrintWriter writer)
+   {
+      for (String ann : annotationIndex.keySet())
+      {
+         writer.print(ann);
+         writer.print(": ");
+         Set<String> classes = annotationIndex.get(ann);
+         Iterator<String> it = classes.iterator();
+         while (it.hasNext())
+         {
+            writer.print(it.next());
+            if (it.hasNext()) writer.print(", ");
+         }
+         writer.println();
+      }
+   }
+
+}


Property changes on: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/scannotation/AnnotationDB.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/scannotation/ClasspathUrlFinder.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/scannotation/ClasspathUrlFinder.java	                        (rev 0)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/scannotation/ClasspathUrlFinder.java	2008-08-10 15:02:38 UTC (rev 88)
@@ -0,0 +1,190 @@
+package org.jboss.webbeans.scannotation;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Enumeration;
+import java.util.List;
+import java.util.StringTokenizer;
+
+/**
+ * Various functions to locate URLs to scan
+ *
+ * @author <a href="mailto:bill at burkecentral.com">Bill Burke</a>
+ * @version $Revision: 1 $
+ */
+public class ClasspathUrlFinder
+{
+
+   /**
+    * Find the classpath URLs for a specific classpath resource.  The classpath URL is extracted
+    * from loader.getResources() using the baseResource.
+    *
+    * @param baseResource
+    * @return
+    */
+   public static URL[] findResourceBases(String baseResource, ClassLoader loader)
+   {
+      ArrayList<URL> list = new ArrayList<URL>();
+      try
+      {
+         Enumeration<URL> urls = loader.getResources(baseResource);
+         while (urls.hasMoreElements())
+         {
+            URL url = urls.nextElement();
+            list.add(findResourceBase(url, baseResource));
+         }
+      }
+      catch (IOException e)
+      {
+         throw new RuntimeException(e);
+      }
+      return list.toArray(new URL[list.size()]);
+   }
+
+   /**
+    * Find the classpath URLs for a specific classpath resource.  The classpath URL is extracted
+    * from loader.getResources() using the baseResource.
+    *
+    * @param baseResource
+    * @return
+    */
+   public static URL[] findResourceBases(String baseResource)
+   {
+      return findResourceBases(baseResource, Thread.currentThread().getContextClassLoader());
+   }
+
+   private static URL findResourceBase(URL url, String baseResource)
+   {
+      String urlString = url.toString();
+      int idx = urlString.lastIndexOf(baseResource);
+      urlString = urlString.substring(0, idx);
+      URL deployUrl = null;
+      try
+      {
+         deployUrl = new URL(urlString);
+      }
+      catch (MalformedURLException e)
+      {
+         throw new RuntimeException(e);
+      }
+      return deployUrl;
+   }
+
+   /**
+    * Find the classpath URL for a specific classpath resource.  The classpath URL is extracted
+    * from Thread.currentThread().getContextClassLoader().getResource() using the baseResource.
+    *
+    * @param baseResource
+    * @return
+    */
+   public static URL findResourceBase(String baseResource)
+   {
+      return findResourceBase(baseResource, Thread.currentThread().getContextClassLoader());
+   }
+
+   /**
+    * Find the classpath URL for a specific classpath resource.  The classpath URL is extracted
+    * from loader.getResource() using the baseResource.
+    *
+    * @param baseResource
+    * @param loader
+    * @return
+    */
+   public static URL findResourceBase(String baseResource, ClassLoader loader)
+   {
+      URL url = loader.getResource(baseResource);
+      return findResourceBase(url, baseResource);
+   }
+
+   /**
+    * Find the classpath for the particular class
+    *
+    * @param clazz
+    * @return
+    */
+   public static URL findClassBase(Class clazz)
+   {
+      String resource = clazz.getName().replace('.', '/') + ".class";
+      return findResourceBase(resource, clazz.getClassLoader());
+   }
+
+   /**
+    * Uses the java.class.path system property to obtain a list of URLs that represent the CLASSPATH
+    *
+    * @return
+    */
+   public static URL[] findClassPaths()
+   {
+      List<URL> list = new ArrayList<URL>();
+      String classpath = System.getProperty("java.class.path");
+      StringTokenizer tokenizer = new StringTokenizer(classpath, File.pathSeparator);
+
+      while (tokenizer.hasMoreTokens())
+      {
+         String path = tokenizer.nextToken();
+         File fp = new File(path);
+         if (!fp.exists()) throw new RuntimeException("File in java.class.path does not exist: " + fp);
+         try
+         {
+            list.add(fp.toURL());
+         }
+         catch (MalformedURLException e)
+         {
+            throw new RuntimeException(e);
+         }
+      }
+      return list.toArray(new URL[list.size()]);
+   }
+
+   /**
+    * Uses the java.class.path system property to obtain a list of URLs that represent the CLASSPATH
+    * <p/>
+    * paths is used as a filter to only include paths that have the specific relative file within it
+    *
+    * @param paths comma list of files that should exist in a particular path
+    * @return
+    */
+   public static URL[] findClassPaths(String... paths)
+   {
+      ArrayList<URL> list = new ArrayList<URL>();
+
+      String classpath = System.getProperty("java.class.path");
+      StringTokenizer tokenizer = new StringTokenizer(classpath, File.pathSeparator);
+      for (int i = 0; i < paths.length; i++)
+      {
+         paths[i] = paths[i].trim();
+      }
+
+      while (tokenizer.hasMoreTokens())
+      {
+         String path = tokenizer.nextToken().trim();
+         boolean found = false;
+         for (String wantedPath : paths)
+         {
+            if (path.endsWith(File.separator + wantedPath))
+            {
+               found = true;
+               break;
+            }
+         }
+         if (!found) continue;
+         File fp = new File(path);
+         if (!fp.exists()) throw new RuntimeException("File in java.class.path does not exists: " + fp);
+         try
+         {
+            list.add(fp.toURL());
+         }
+         catch (MalformedURLException e)
+         {
+            throw new RuntimeException(e);
+         }
+      }
+      return list.toArray(new URL[list.size()]);
+   }
+
+
+}
+


Property changes on: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/scannotation/ClasspathUrlFinder.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/scannotation/FileIterator.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/scannotation/FileIterator.java	                        (rev 0)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/scannotation/FileIterator.java	2008-08-10 15:02:38 UTC (rev 88)
@@ -0,0 +1,73 @@
+package org.jboss.webbeans.scannotation;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+/**
+ * @author <a href="mailto:bill at burkecentral.com">Bill Burke</a>
+ * @version $Revision: 1 $
+ */
+public class FileIterator implements Iterator<InputStream>
+{
+   private List<File> files;
+   private int index = 0;
+
+   public FileIterator(File file)
+   {
+      files = new ArrayList<File>();
+      try
+      {
+         create(files, file);
+      }
+      catch (Exception e)
+      {
+         throw new RuntimeException(e);
+      }
+   }
+
+   protected static void create(List<File> list, File dir) throws Exception
+   {
+      File[] files = dir.listFiles();
+      for (int i = 0; i < files.length; i++)
+      {
+         if (files[i].isDirectory())
+         {
+            create(list, files[i]);
+         }
+         else
+         {
+            list.add(files[i]);
+         }
+      }
+   }
+
+   public InputStream next()
+   {
+      if (index >= files.size()) return null;
+      File fp = (File) files.get(index++);
+      try
+      {
+         return new FileInputStream(fp);
+      }
+      catch (FileNotFoundException e)
+      {
+         throw new RuntimeException(e);
+      }
+   }
+   
+   public boolean hasNext()
+   {
+      throw new UnsupportedOperationException("Cannot call hasNext() on FileIterator");
+   }
+
+   public void remove()
+   {
+      throw new UnsupportedOperationException("Cannot call remove() on FileIterator");
+   }
+   
+}


Property changes on: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/scannotation/FileIterator.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/scannotation/InputStreamWrapper.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/scannotation/InputStreamWrapper.java	                        (rev 0)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/scannotation/InputStreamWrapper.java	2008-08-10 15:02:38 UTC (rev 88)
@@ -0,0 +1,72 @@
+package org.jboss.webbeans.scannotation;
+
+import java.io.InputStream;
+import java.io.IOException;
+
+/**
+ * Delegate to everything but close().  This object will not close the stream
+ *
+ * @author <a href="mailto:bill at burkecentral.com">Bill Burke</a>
+ * @version $Revision: 1 $
+ */
+public class InputStreamWrapper extends InputStream
+{
+   private InputStream delegate;
+
+   public InputStreamWrapper(InputStream delegate)
+   {
+      this.delegate = delegate;
+   }
+
+   public int read()
+           throws IOException
+   {
+      return delegate.read();
+   }
+
+   public int read(byte[] bytes)
+           throws IOException
+   {
+      return delegate.read(bytes);
+   }
+
+   public int read(byte[] bytes, int i, int i1)
+           throws IOException
+   {
+      return delegate.read(bytes, i, i1);
+   }
+
+   public long skip(long l)
+           throws IOException
+   {
+      return delegate.skip(l);
+   }
+
+   public int available()
+           throws IOException
+   {
+      return delegate.available();
+   }
+
+   public void close()
+           throws IOException
+   {
+      // ignored
+   }
+
+   public void mark(int i)
+   {
+      delegate.mark(i);
+   }
+
+   public void reset()
+           throws IOException
+   {
+      delegate.reset();
+   }
+
+   public boolean markSupported()
+   {
+      return delegate.markSupported();
+   }
+}


Property changes on: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/scannotation/InputStreamWrapper.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/scannotation/IteratorFactory.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/scannotation/IteratorFactory.java	                        (rev 0)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/scannotation/IteratorFactory.java	2008-08-10 15:02:38 UTC (rev 88)
@@ -0,0 +1,44 @@
+package org.jboss.webbeans.scannotation;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+import java.util.Iterator;
+
+/**
+ * @author <a href="mailto:bill at burkecentral.com">Bill Burke</a>
+ * @version $Revision: 1 $
+ */
+public class IteratorFactory
+{
+
+   public static Iterator<InputStream> create(URL url) throws IOException
+   {
+      String urlString = url.toString();
+      if (urlString.endsWith("!/"))
+      {
+         urlString = urlString.substring(4);
+         urlString = urlString.substring(0, urlString.length() - 2);
+         url = new URL(urlString);
+      }
+
+
+      if (!urlString.endsWith("/"))
+      {
+         return new JarIterator(url.openStream());
+      }
+      else
+      {
+         File f = new File(url.getPath());
+         if (f.isDirectory())
+         {
+            return new FileIterator(f);
+         }
+         else
+         {
+            return new JarIterator(url.openStream());
+         }
+      }
+   }
+}


Property changes on: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/scannotation/IteratorFactory.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/scannotation/JarIterator.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/scannotation/JarIterator.java	                        (rev 0)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/scannotation/JarIterator.java	2008-08-10 15:02:38 UTC (rev 88)
@@ -0,0 +1,98 @@
+package org.jboss.webbeans.scannotation;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Iterator;
+import java.util.jar.JarEntry;
+import java.util.jar.JarInputStream;
+
+/**
+ * @author <a href="mailto:bill at burkecentral.com">Bill Burke</a>
+ * @version $Revision: 1 $
+ */
+public class JarIterator implements Iterator<InputStream>
+{
+   JarInputStream jar;
+   JarEntry next;
+   boolean initial = true;
+   boolean closed = false;
+
+   public JarIterator(File file) throws IOException
+   {
+      this(new FileInputStream(file));
+   }
+
+
+   public JarIterator(InputStream is) throws IOException
+   {
+      jar = new JarInputStream(is);
+   }
+
+   private void setNext()
+   {
+      initial = true;
+      try
+      {
+         if (next != null)
+         {
+            jar.closeEntry();
+         }
+         next = null;
+         do
+         {
+            next = jar.getNextJarEntry();
+         }
+         while (next != null && next.isDirectory());
+         if (next == null)
+         {
+            close();
+         }
+      }
+      catch (IOException e)
+      {
+         throw new RuntimeException("failed to browse jar", e);
+      }
+   }
+
+   public InputStream next()
+   {
+      if (closed || (next == null && !initial)) 
+      {
+         return null;
+      }
+      setNext();
+      if (next == null)
+      {
+         return null;
+      }
+      return new InputStreamWrapper(jar);
+   }
+
+   private void close()
+   {
+      try
+      {
+         closed = true;
+         jar.close();
+      }
+      catch (IOException ignored)
+      {
+
+      }
+
+   }
+
+
+   public boolean hasNext()
+   {
+      throw new UnsupportedOperationException("Cannot call hasNext() on a JarIterator");
+   }
+
+
+   public void remove()
+   {
+      throw new UnsupportedOperationException("Cannot call remove() on a JarIterator");
+   }
+}


Property changes on: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/scannotation/JarIterator.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ComponentMetaModelTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ComponentMetaModelTest.java	2008-08-10 15:00:47 UTC (rev 87)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ComponentMetaModelTest.java	2008-08-10 15:02:38 UTC (rev 88)
@@ -46,7 +46,6 @@
 import org.jboss.webbeans.test.components.Carp;
 import org.jboss.webbeans.test.components.Cat;
 import org.jboss.webbeans.test.components.Chair;
-import org.jboss.webbeans.test.components.ComponentWithTooManyDeploymentTypes;
 import org.jboss.webbeans.test.components.ComponentWithTooManyScopeTypes;
 import org.jboss.webbeans.test.components.Cow;
 import org.jboss.webbeans.test.components.Goldfish;
@@ -58,6 +57,7 @@
 import org.jboss.webbeans.test.components.Pig;
 import org.jboss.webbeans.test.components.SeaBass;
 import org.jboss.webbeans.test.components.Tuna;
+import org.jboss.webbeans.test.components.broken.ComponentWithTooManyDeploymentTypes;
 import org.jboss.webbeans.test.mock.MockContainerImpl;
 import org.jboss.webbeans.util.AnnotatedItem;
 import org.jboss.webbeans.util.ClassAnnotatedItem;

Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/DeploymentStrategyTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/DeploymentStrategyTest.java	2008-08-10 15:00:47 UTC (rev 87)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/DeploymentStrategyTest.java	2008-08-10 15:02:38 UTC (rev 88)
@@ -6,8 +6,8 @@
 
 import org.jboss.webbeans.ContainerImpl;
 import org.jboss.webbeans.deployment.DeploymentStrategy;
+import org.jboss.webbeans.scannotation.ClasspathUrlFinder;
 import org.junit.Test;
-import org.scannotation.ClasspathUrlFinder;
 
 public class DeploymentStrategyTest
 {
@@ -18,7 +18,7 @@
       URL[] urls = {ClasspathUrlFinder.findClassBase(DeploymentStrategyTest.class)};
       Container container = new ContainerImpl(null);
       DeploymentStrategy deploymentStrategy = new DeploymentStrategy(Thread.currentThread().getContextClassLoader(), container);
-      deploymentStrategy.scan(urls);
+      deploymentStrategy.scan(urls, "org.jboss.webbeans.test.annotations.broken", "org.jboss.webbeans.test.bindings.broken", "org.jboss.webbeans.test.components.broken");
    }
    
 }

Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/StereotypeMetaModelTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/StereotypeMetaModelTest.java	2008-08-10 15:00:47 UTC (rev 87)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/StereotypeMetaModelTest.java	2008-08-10 15:02:38 UTC (rev 88)
@@ -11,10 +11,10 @@
 import org.jboss.webbeans.test.annotations.AnimalOrderStereotype;
 import org.jboss.webbeans.test.annotations.AnimalStereotype;
 import org.jboss.webbeans.test.annotations.RequestScopedAnimalStereotype;
-import org.jboss.webbeans.test.annotations.StereotypeWithTooManyScopeTypes;
-import org.jboss.webbeans.test.annotations.StereotypeWithNonEmptyNamed;
-import org.jboss.webbeans.test.annotations.StereotypeWithTooManyDeploymentTypes;
-import org.jboss.webbeans.test.annotations.StereotypeWithBindingTypes;
+import org.jboss.webbeans.test.annotations.broken.StereotypeWithBindingTypes;
+import org.jboss.webbeans.test.annotations.broken.StereotypeWithNonEmptyNamed;
+import org.jboss.webbeans.test.annotations.broken.StereotypeWithTooManyDeploymentTypes;
+import org.jboss.webbeans.test.annotations.broken.StereotypeWithTooManyScopeTypes;
 import org.jboss.webbeans.test.components.Animal;
 import org.jboss.webbeans.test.components.Order;
 import org.jboss.webbeans.util.ClassAnnotatedItem;

Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/StereotypeWithBindingTypes.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/StereotypeWithBindingTypes.java	2008-08-10 15:00:47 UTC (rev 87)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/StereotypeWithBindingTypes.java	2008-08-10 15:02:38 UTC (rev 88)
@@ -1,17 +0,0 @@
-package org.jboss.webbeans.test.annotations;
-
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-import javax.webbeans.Stereotype;
-
- at Stereotype
- at Target( { TYPE })
- at Retention(RUNTIME)
- at Asynchronous
-public @interface StereotypeWithBindingTypes
-{
-
-}

Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/StereotypeWithNonEmptyNamed.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/StereotypeWithNonEmptyNamed.java	2008-08-10 15:00:47 UTC (rev 87)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/StereotypeWithNonEmptyNamed.java	2008-08-10 15:02:38 UTC (rev 88)
@@ -1,19 +0,0 @@
-package org.jboss.webbeans.test.annotations;
-
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import javax.webbeans.Named;
-import javax.webbeans.Stereotype;
-
- at Stereotype
- at Target( { TYPE })
- at Retention(RUNTIME)
- at Named("foo")
-public @interface StereotypeWithNonEmptyNamed
-{
-
-}

Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/StereotypeWithTooManyDeploymentTypes.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/StereotypeWithTooManyDeploymentTypes.java	2008-08-10 15:00:47 UTC (rev 87)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/StereotypeWithTooManyDeploymentTypes.java	2008-08-10 15:02:38 UTC (rev 88)
@@ -1,20 +0,0 @@
-package org.jboss.webbeans.test.annotations;
-
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import javax.webbeans.Production;
-import javax.webbeans.Stereotype;
-
- at Stereotype
- at Target( { TYPE })
- at Retention(RUNTIME)
- at Production
- at AnotherDeploymentType
-public @interface StereotypeWithTooManyDeploymentTypes
-{
-
-}

Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/StereotypeWithTooManyScopeTypes.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/StereotypeWithTooManyScopeTypes.java	2008-08-10 15:00:47 UTC (rev 87)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/StereotypeWithTooManyScopeTypes.java	2008-08-10 15:02:38 UTC (rev 88)
@@ -1,21 +0,0 @@
-package org.jboss.webbeans.test.annotations;
-
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import javax.webbeans.ApplicationScoped;
-import javax.webbeans.RequestScoped;
-import javax.webbeans.Stereotype;
-
- at Stereotype
- at Target( { TYPE })
- at Retention(RUNTIME)
- at ApplicationScoped
- at RequestScoped
-public @interface StereotypeWithTooManyScopeTypes
-{
-
-}

Copied: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/broken/StereotypeWithBindingTypes.java (from rev 83, ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/StereotypeWithBindingTypes.java)
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/broken/StereotypeWithBindingTypes.java	                        (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/broken/StereotypeWithBindingTypes.java	2008-08-10 15:02:38 UTC (rev 88)
@@ -0,0 +1,19 @@
+package org.jboss.webbeans.test.annotations.broken;
+
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+import javax.webbeans.Stereotype;
+
+import org.jboss.webbeans.test.annotations.Asynchronous;
+
+ at Stereotype
+ at Target( { TYPE })
+ at Retention(RUNTIME)
+ at Asynchronous
+public @interface StereotypeWithBindingTypes
+{
+
+}

Copied: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/broken/StereotypeWithNonEmptyNamed.java (from rev 78, ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/StereotypeWithNonEmptyNamed.java)
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/broken/StereotypeWithNonEmptyNamed.java	                        (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/broken/StereotypeWithNonEmptyNamed.java	2008-08-10 15:02:38 UTC (rev 88)
@@ -0,0 +1,19 @@
+package org.jboss.webbeans.test.annotations.broken;
+
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.webbeans.Named;
+import javax.webbeans.Stereotype;
+
+ at Stereotype
+ at Target( { TYPE })
+ at Retention(RUNTIME)
+ at Named("foo")
+public @interface StereotypeWithNonEmptyNamed
+{
+
+}


Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/broken/StereotypeWithNonEmptyNamed.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Copied: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/broken/StereotypeWithTooManyDeploymentTypes.java (from rev 78, ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/StereotypeWithTooManyDeploymentTypes.java)
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/broken/StereotypeWithTooManyDeploymentTypes.java	                        (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/broken/StereotypeWithTooManyDeploymentTypes.java	2008-08-10 15:02:38 UTC (rev 88)
@@ -0,0 +1,22 @@
+package org.jboss.webbeans.test.annotations.broken;
+
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.webbeans.Production;
+import javax.webbeans.Stereotype;
+
+import org.jboss.webbeans.test.annotations.AnotherDeploymentType;
+
+ at Stereotype
+ at Target( { TYPE })
+ at Retention(RUNTIME)
+ at Production
+ at AnotherDeploymentType
+public @interface StereotypeWithTooManyDeploymentTypes
+{
+
+}


Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/broken/StereotypeWithTooManyDeploymentTypes.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Copied: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/broken/StereotypeWithTooManyScopeTypes.java (from rev 83, ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/StereotypeWithTooManyScopeTypes.java)
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/broken/StereotypeWithTooManyScopeTypes.java	                        (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/broken/StereotypeWithTooManyScopeTypes.java	2008-08-10 15:02:38 UTC (rev 88)
@@ -0,0 +1,21 @@
+package org.jboss.webbeans.test.annotations.broken;
+
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.webbeans.ApplicationScoped;
+import javax.webbeans.RequestScoped;
+import javax.webbeans.Stereotype;
+
+ at Stereotype
+ at Target( { TYPE })
+ at Retention(RUNTIME)
+ at ApplicationScoped
+ at RequestScoped
+public @interface StereotypeWithTooManyScopeTypes
+{
+
+}

Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/components/ComponentWithTooManyDeploymentTypes.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/components/ComponentWithTooManyDeploymentTypes.java	2008-08-10 15:00:47 UTC (rev 87)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/components/ComponentWithTooManyDeploymentTypes.java	2008-08-10 15:02:38 UTC (rev 88)
@@ -1,12 +0,0 @@
-package org.jboss.webbeans.test.components;
-
-import javax.webbeans.Production;
-
-import org.jboss.webbeans.test.annotations.AnotherDeploymentType;
-
- at Production
- at AnotherDeploymentType
-public class ComponentWithTooManyDeploymentTypes
-{
-
-}

Copied: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/components/broken/ComponentWithTooManyDeploymentTypes.java (from rev 78, ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/components/ComponentWithTooManyDeploymentTypes.java)
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/components/broken/ComponentWithTooManyDeploymentTypes.java	                        (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/components/broken/ComponentWithTooManyDeploymentTypes.java	2008-08-10 15:02:38 UTC (rev 88)
@@ -0,0 +1,12 @@
+package org.jboss.webbeans.test.components.broken;
+
+import javax.webbeans.Production;
+
+import org.jboss.webbeans.test.annotations.AnotherDeploymentType;
+
+ at Production
+ at AnotherDeploymentType
+public class ComponentWithTooManyDeploymentTypes
+{
+
+}


Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/components/broken/ComponentWithTooManyDeploymentTypes.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain




More information about the weld-commits mailing list