commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r1142166 - in /commons/proper/digester/trunk/src/main/java/org/apache/commons/digester3: AbstractMethodRule.java BeanPropertySetterRule.java CallMethodRule.java
Date Sat, 02 Jul 2011 07:51:19 GMT
Author: simonetripodi
Date: Sat Jul  2 07:51:19 2011
New Revision: 1142166

URL: http://svn.apache.org/viewvc?rev=1142166&view=rev
Log:
imported static methods

Modified:
    commons/proper/digester/trunk/src/main/java/org/apache/commons/digester3/AbstractMethodRule.java
    commons/proper/digester/trunk/src/main/java/org/apache/commons/digester3/BeanPropertySetterRule.java
    commons/proper/digester/trunk/src/main/java/org/apache/commons/digester3/CallMethodRule.java

Modified: commons/proper/digester/trunk/src/main/java/org/apache/commons/digester3/AbstractMethodRule.java
URL: http://svn.apache.org/viewvc/commons/proper/digester/trunk/src/main/java/org/apache/commons/digester3/AbstractMethodRule.java?rev=1142166&r1=1142165&r2=1142166&view=diff
==============================================================================
--- commons/proper/digester/trunk/src/main/java/org/apache/commons/digester3/AbstractMethodRule.java
(original)
+++ commons/proper/digester/trunk/src/main/java/org/apache/commons/digester3/AbstractMethodRule.java
Sat Jul  2 07:51:19 2011
@@ -20,8 +20,9 @@ package org.apache.commons.digester3;
  */
 
 import static java.lang.String.format;
+import static org.apache.commons.beanutils.MethodUtils.invokeExactMethod;
+import static org.apache.commons.beanutils.MethodUtils.invokeMethod;
 
-import org.apache.commons.beanutils.MethodUtils;
 import org.xml.sax.Attributes;
 
 /**
@@ -237,11 +238,11 @@ public abstract class AbstractMethodRule
 
         if ( useExactMatch )
         {
-            MethodUtils.invokeExactMethod( parent, methodName, new Object[] { child }, paramTypes
);
+            invokeExactMethod( parent, methodName, new Object[] { child }, paramTypes );
         }
         else
         {
-            MethodUtils.invokeMethod( parent, methodName, new Object[] { child }, paramTypes
);
+            invokeMethod( parent, methodName, new Object[] { child }, paramTypes );
         }
     }
 

Modified: commons/proper/digester/trunk/src/main/java/org/apache/commons/digester3/BeanPropertySetterRule.java
URL: http://svn.apache.org/viewvc/commons/proper/digester/trunk/src/main/java/org/apache/commons/digester3/BeanPropertySetterRule.java?rev=1142166&r1=1142165&r2=1142166&view=diff
==============================================================================
--- commons/proper/digester/trunk/src/main/java/org/apache/commons/digester3/BeanPropertySetterRule.java
(original)
+++ commons/proper/digester/trunk/src/main/java/org/apache/commons/digester3/BeanPropertySetterRule.java
Sat Jul  2 07:51:19 2011
@@ -20,13 +20,13 @@ package org.apache.commons.digester3;
  */
 
 import static java.lang.String.format;
+import static org.apache.commons.beanutils.BeanUtils.setProperty;
+import static org.apache.commons.beanutils.PropertyUtils.getPropertyDescriptor;
 
 import java.beans.PropertyDescriptor;
 
-import org.apache.commons.beanutils.BeanUtils;
 import org.apache.commons.beanutils.DynaBean;
 import org.apache.commons.beanutils.DynaProperty;
-import org.apache.commons.beanutils.PropertyUtils;
 import org.xml.sax.Attributes;
 
 /**
@@ -200,7 +200,7 @@ public class BeanPropertySetterRule
         else
         /* this is a standard JavaBean */
         {
-            PropertyDescriptor desc = PropertyUtils.getPropertyDescriptor( top, property
);
+            PropertyDescriptor desc = getPropertyDescriptor( top, property );
             if ( desc == null )
             {
                 throw new NoSuchMethodException( "Bean has no property named " + property
);
@@ -208,7 +208,7 @@ public class BeanPropertySetterRule
         }
 
         // Set the property (with conversion as necessary)
-        BeanUtils.setProperty( top, property, bodyText );
+        setProperty( top, property, bodyText );
     }
 
     /**

Modified: commons/proper/digester/trunk/src/main/java/org/apache/commons/digester3/CallMethodRule.java
URL: http://svn.apache.org/viewvc/commons/proper/digester/trunk/src/main/java/org/apache/commons/digester3/CallMethodRule.java?rev=1142166&r1=1142165&r2=1142166&view=diff
==============================================================================
--- commons/proper/digester/trunk/src/main/java/org/apache/commons/digester3/CallMethodRule.java
(original)
+++ commons/proper/digester/trunk/src/main/java/org/apache/commons/digester3/CallMethodRule.java
Sat Jul  2 07:51:19 2011
@@ -20,10 +20,12 @@ package org.apache.commons.digester3;
  */
 
 import static java.lang.String.format;
+import static org.apache.commons.beanutils.ConvertUtils.convert;
+import static org.apache.commons.beanutils.MethodUtils.invokeExactMethod;
+import static org.apache.commons.beanutils.MethodUtils.invokeMethod;
 
 import java.util.Formatter;
 
-import org.apache.commons.beanutils.ConvertUtils;
 import org.apache.commons.beanutils.MethodUtils;
 import org.xml.sax.Attributes;
 import org.xml.sax.SAXException;
@@ -464,7 +466,7 @@ public class CallMethodRule
                 || ( parameters[i] instanceof String && !String.class.isAssignableFrom(
paramTypes[i] ) ) )
             {
 
-                paramValues[i] = ConvertUtils.convert( (String) parameters[i], paramTypes[i]
);
+                paramValues[i] = convert( (String) parameters[i], paramTypes[i] );
             }
             else
             {
@@ -509,13 +511,13 @@ public class CallMethodRule
         if ( useExactMatch )
         {
             // invoke using exact match
-            result = MethodUtils.invokeExactMethod( target, methodName, paramValues, paramTypes
);
+            result = invokeExactMethod( target, methodName, paramValues, paramTypes );
 
         }
         else
         {
             // invoke using fuzzier match
-            result = MethodUtils.invokeMethod( target, methodName, paramValues, paramTypes
);
+            result = invokeMethod( target, methodName, paramValues, paramTypes );
         }
 
         processMethodCallResult( result );



Mime
View raw message