commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r903160 - in /commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations: DigesterLoader.java handlers/MethodHandler.java
Date Tue, 26 Jan 2010 10:36:57 GMT
Author: simonetripodi
Date: Tue Jan 26 10:36:56 2010
New Revision: 903160

URL: http://svn.apache.org/viewvc?rev=903160&view=rev
Log:
refactored method to add rule providers to an existing RuleSet, reading the stack call it
was a little confusing - thanks Tommaso Teofili (tommaso)

Modified:
    commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/DigesterLoader.java
    commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/handlers/MethodHandler.java

Modified: commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/DigesterLoader.java
URL: http://svn.apache.org/viewvc/commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/DigesterLoader.java?rev=903160&r1=903159&r2=903160&view=diff
==============================================================================
--- commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/DigesterLoader.java
(original)
+++ commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/DigesterLoader.java
Tue Jan 26 10:36:56 2010
@@ -102,7 +102,7 @@
         }
 
         FromAnnotationsRuleSet ruleSet = new FromAnnotationsRuleSet();
-        addRules(target, ruleSet);
+        addRulesTo(target, ruleSet);
         CACHED_RULESET.put(target, ruleSet);
 
         return ruleSet;
@@ -115,7 +115,7 @@
      * @param target the class has to be analyzed.
      * @param ruleSet the RuleSet where adding the providers.
      */
-    public static void addRules(final Class<?> target, FromAnnotationsRuleSet ruleSet)
{
+    public static void addRulesTo(final Class<?> target, FromAnnotationsRuleSet ruleSet)
{
         if (target == Object.class
                 || target.isInterface()
                 || ruleSet.mapsClass(target)) {
@@ -149,7 +149,7 @@
         }
 
         ruleSet.addMappedClass(target);
-        addRules(target.getSuperclass(), ruleSet);
+        addRulesTo(target.getSuperclass(), ruleSet);
     }
 
     /**

Modified: commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/handlers/MethodHandler.java
URL: http://svn.apache.org/viewvc/commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/handlers/MethodHandler.java?rev=903160&r1=903159&r2=903160&view=diff
==============================================================================
--- commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/handlers/MethodHandler.java
(original)
+++ commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/handlers/MethodHandler.java
Tue Jan 26 10:36:56 2010
@@ -107,7 +107,7 @@
     private void doHandle(Annotation methodAnnotation, Annotation annotation, Method method,
Class<?> type, FromAnnotationsRuleSet ruleSet) {
         if (annotation.annotationType().isAnnotationPresent(DigesterRule.class)
                 && annotation.annotationType().isAnnotationPresent(CreationRule.class))
{
-            DigesterLoader.addRules(type, ruleSet);
+            DigesterLoader.addRulesTo(type, ruleSet);
 
             DigesterRule digesterRule = methodAnnotation.annotationType().getAnnotation(DigesterRule.class);
 



Mime
View raw message