geronimo-xbean-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dblev...@apache.org
Subject svn commit: r1326440 - /geronimo/xbean/trunk/xbean-finder/src/main/java/org/apache/xbean/finder/AnnotationFinder.java
Date Sun, 15 Apr 2012 23:14:37 GMT
Author: dblevins
Date: Sun Apr 15 23:14:37 2012
New Revision: 1326440

URL: http://svn.apache.org/viewvc?rev=1326440&view=rev
Log:
split out link() into more fine grained methods for keener selection of performance impacts

Modified:
    geronimo/xbean/trunk/xbean-finder/src/main/java/org/apache/xbean/finder/AnnotationFinder.java

Modified: geronimo/xbean/trunk/xbean-finder/src/main/java/org/apache/xbean/finder/AnnotationFinder.java
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-finder/src/main/java/org/apache/xbean/finder/AnnotationFinder.java?rev=1326440&r1=1326439&r2=1326440&view=diff
==============================================================================
--- geronimo/xbean/trunk/xbean-finder/src/main/java/org/apache/xbean/finder/AnnotationFinder.java
(original)
+++ geronimo/xbean/trunk/xbean-finder/src/main/java/org/apache/xbean/finder/AnnotationFinder.java
Sun Apr 15 23:14:37 2012
@@ -187,21 +187,39 @@ public class AnnotationFinder implements
      */
     public AnnotationFinder link() {
 
-        for (ClassInfo classInfo : classInfos.values().toArray(new ClassInfo[classInfos.size()]))
{
+        enableFindSubclasses();
 
-            linkParent(classInfo);
-        }
+        enableFindImplementations();
+
+        enableMetaAnnotations();
+
+        return this;
+    }
+
+    public AnnotationFinder enableMetaAnnotations() {
+        // diff new and old lists
+        resolveAnnotations(new ArrayList<String>());
+
+        linkMetaAnnotations();
 
+        return this;
+    }
+
+    public AnnotationFinder enableFindImplementations() {
         for (ClassInfo classInfo : classInfos.values().toArray(new ClassInfo[classInfos.size()]))
{
 
             linkInterfaces(classInfo);
 
         }
 
-        // diff new and old lists
-        resolveAnnotations(new ArrayList<String>());
+        return this;
+    }
 
-        linkMetaAnnotations();
+    public AnnotationFinder enableFindSubclasses() {
+        for (ClassInfo classInfo : classInfos.values().toArray(new ClassInfo[classInfos.size()]))
{
+
+            linkParent(classInfo);
+        }
 
         return this;
     }



Mime
View raw message