commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r1127397 - in /commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/xmlrules/metaparser: AbstractXmlMethodRule.java SetNextRule.java SetRootRule.java SetTopRule.java
Date Wed, 25 May 2011 06:37:06 GMT
Author: simonetripodi
Date: Wed May 25 06:37:05 2011
New Revision: 1127397

URL: http://svn.apache.org/viewvc?rev=1127397&view=rev
Log:
supplied missing/useless ParamTypeBuilder common interface

Modified:
    commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/xmlrules/metaparser/AbstractXmlMethodRule.java
    commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/xmlrules/metaparser/SetNextRule.java
    commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/xmlrules/metaparser/SetRootRule.java
    commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/xmlrules/metaparser/SetTopRule.java

Modified: commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/xmlrules/metaparser/AbstractXmlMethodRule.java
URL: http://svn.apache.org/viewvc/commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/xmlrules/metaparser/AbstractXmlMethodRule.java?rev=1127397&r1=1127396&r2=1127397&view=diff
==============================================================================
--- commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/xmlrules/metaparser/AbstractXmlMethodRule.java
(original)
+++ commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/xmlrules/metaparser/AbstractXmlMethodRule.java
Wed May 25 06:37:05 2011
@@ -17,7 +17,6 @@
  */
 package org.apache.commons.digester3.xmlrules.metaparser;
 
-import org.apache.commons.digester3.Rule;
 import org.apache.commons.digester3.binder.LinkedRuleBuilder;
 import org.apache.commons.digester3.binder.RulesBinder;
 import org.xml.sax.Attributes;
@@ -44,18 +43,13 @@ abstract class AbstractXmlMethodRule
         String methodName = attributes.getValue( "methodname" );
         String paramType = attributes.getValue( "paramtype" );
 
-        ParamTypeBuilder<? extends Rule> builder = this.createBuilder( linkedRuleBuilder,
methodName );
-        if ( paramType != null && paramType.length() > 0 )
-        {
-            builder.withParameterType( paramType );
-        }
+        bindRule( linkedRuleBuilder, methodName, paramType );
     }
 
     /**
      * @param methodName
      * @return
      */
-    protected abstract ParamTypeBuilder<? extends Rule> createBuilder( LinkedRuleBuilder
linkedRuleBuilder,
-                                                                       String methodName
);
+    protected abstract void bindRule( LinkedRuleBuilder linkedRuleBuilder, String methodName,
String paramType );
 
 }

Modified: commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/xmlrules/metaparser/SetNextRule.java
URL: http://svn.apache.org/viewvc/commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/xmlrules/metaparser/SetNextRule.java?rev=1127397&r1=1127396&r2=1127397&view=diff
==============================================================================
--- commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/xmlrules/metaparser/SetNextRule.java
(original)
+++ commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/xmlrules/metaparser/SetNextRule.java
Wed May 25 06:37:05 2011
@@ -17,9 +17,9 @@
  */
 package org.apache.commons.digester3.xmlrules.metaparser;
 
-import org.apache.commons.digester3.Rule;
 import org.apache.commons.digester3.binder.LinkedRuleBuilder;
 import org.apache.commons.digester3.binder.RulesBinder;
+import org.apache.commons.digester3.binder.SetNextBuilder;
 
 /**
  * 
@@ -41,9 +41,14 @@ final class SetNextRule
      * {@inheritDoc}
      */
     @Override
-    protected ParamTypeBuilder<? extends Rule> createBuilder( LinkedRuleBuilder linkedRuleBuilder,
String methodName )
+    protected void bindRule( LinkedRuleBuilder linkedRuleBuilder, String methodName, String
paramType )
     {
-        return linkedRuleBuilder.setNext( methodName );
+        SetNextBuilder builder = linkedRuleBuilder.setNext( methodName );
+
+        if ( paramType != null && paramType.length() > 0 )
+        {
+            builder.withParameterType( paramType );
+        }
     }
 
 }

Modified: commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/xmlrules/metaparser/SetRootRule.java
URL: http://svn.apache.org/viewvc/commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/xmlrules/metaparser/SetRootRule.java?rev=1127397&r1=1127396&r2=1127397&view=diff
==============================================================================
--- commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/xmlrules/metaparser/SetRootRule.java
(original)
+++ commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/xmlrules/metaparser/SetRootRule.java
Wed May 25 06:37:05 2011
@@ -17,9 +17,9 @@
  */
 package org.apache.commons.digester3.xmlrules.metaparser;
 
-import org.apache.commons.digester3.Rule;
 import org.apache.commons.digester3.binder.LinkedRuleBuilder;
 import org.apache.commons.digester3.binder.RulesBinder;
+import org.apache.commons.digester3.binder.SetRootBuilder;
 
 /**
  * 
@@ -41,9 +41,14 @@ final class SetRootRule
      * {@inheritDoc}
      */
     @Override
-    protected ParamTypeBuilder<? extends Rule> createBuilder( LinkedRuleBuilder linkedRuleBuilder,
String methodName )
+    protected void bindRule( LinkedRuleBuilder linkedRuleBuilder, String methodName, String
paramType )
     {
-        return linkedRuleBuilder.setRoot( methodName );
+        SetRootBuilder builder = linkedRuleBuilder.setRoot( methodName );
+
+        if ( paramType != null && paramType.length() > 0 )
+        {
+            builder.withParameterType( paramType );
+        }
     }
 
 }

Modified: commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/xmlrules/metaparser/SetTopRule.java
URL: http://svn.apache.org/viewvc/commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/xmlrules/metaparser/SetTopRule.java?rev=1127397&r1=1127396&r2=1127397&view=diff
==============================================================================
--- commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/xmlrules/metaparser/SetTopRule.java
(original)
+++ commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/xmlrules/metaparser/SetTopRule.java
Wed May 25 06:37:05 2011
@@ -17,9 +17,9 @@
  */
 package org.apache.commons.digester3.xmlrules.metaparser;
 
-import org.apache.commons.digester3.Rule;
 import org.apache.commons.digester3.binder.LinkedRuleBuilder;
 import org.apache.commons.digester3.binder.RulesBinder;
+import org.apache.commons.digester3.binder.SetTopBuilder;
 
 /**
  * 
@@ -41,9 +41,14 @@ final class SetTopRule
      * {@inheritDoc}
      */
     @Override
-    protected ParamTypeBuilder<? extends Rule> createBuilder( LinkedRuleBuilder linkedRuleBuilder,
String methodName )
+    protected void bindRule( LinkedRuleBuilder linkedRuleBuilder, String methodName, String
paramType )
     {
-        return linkedRuleBuilder.setTop( methodName );
+        SetTopBuilder builder = linkedRuleBuilder.setTop( methodName );
+
+        if ( paramType != null && paramType.length() > 0 )
+        {
+            builder.withParameterType( paramType );
+        }
     }
 
 }



Mime
View raw message