[jboss-cvs] JBossAS SVN: r73498 - projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/annotations/wb.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Mon May 19 15:39:30 EDT 2008


Author: alesj
Date: 2008-05-19 15:39:30 -0400 (Mon, 19 May 2008)
New Revision: 73498

Modified:
   projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/annotations/wb/WBInjectAnnotationPlugin.java
Log:
Extract filter annotation check.

Modified: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/annotations/wb/WBInjectAnnotationPlugin.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/annotations/wb/WBInjectAnnotationPlugin.java	2008-05-19 19:25:44 UTC (rev 73497)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/annotations/wb/WBInjectAnnotationPlugin.java	2008-05-19 19:39:30 UTC (rev 73498)
@@ -76,13 +76,24 @@
       List<Annotation> annotations = new ArrayList<Annotation>();
       for (Annotation annotation : underlyingAnnotations)
       {
-         if (excludedAnnotations.contains(annotation.annotationType()) == false)
+         if (isFilterAnnotation(annotation))
             annotations.add(annotation);
       }
       return new WBInjectionValueMetaData(type, annotations.toArray(new Annotation[annotations.size()]));
    }
 
    /**
+    * Is this 'filter' candidate annotation.
+    *
+    * @param annotation the annotation
+    * @return true if we should include this in filter annotations
+    */
+   protected boolean isFilterAnnotation(Annotation annotation)
+   {
+      return excludedAnnotations.contains(annotation.annotationType()) == false;
+   }
+
+   /**
     * Add excluded annotations.
     *
     * @param annotationClass the excluded annotation's class.




More information about the jboss-cvs-commits mailing list