imported static methods
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/digester/trunk@1142166 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/src/main/java/org/apache/commons/digester3/AbstractMethodRule.java b/src/main/java/org/apache/commons/digester3/AbstractMethodRule.java
index 510d4ec..2e8ee77 100644
--- a/src/main/java/org/apache/commons/digester3/AbstractMethodRule.java
+++ b/src/main/java/org/apache/commons/digester3/AbstractMethodRule.java
@@ -20,8 +20,9 @@
*/
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 @@
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 );
}
}
diff --git a/src/main/java/org/apache/commons/digester3/BeanPropertySetterRule.java b/src/main/java/org/apache/commons/digester3/BeanPropertySetterRule.java
index d94a504..90183cb 100644
--- a/src/main/java/org/apache/commons/digester3/BeanPropertySetterRule.java
+++ b/src/main/java/org/apache/commons/digester3/BeanPropertySetterRule.java
@@ -20,13 +20,13 @@
*/
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 @@
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 @@
}
// Set the property (with conversion as necessary)
- BeanUtils.setProperty( top, property, bodyText );
+ setProperty( top, property, bodyText );
}
/**
diff --git a/src/main/java/org/apache/commons/digester3/CallMethodRule.java b/src/main/java/org/apache/commons/digester3/CallMethodRule.java
index a480825..9d797c6 100644
--- a/src/main/java/org/apache/commons/digester3/CallMethodRule.java
+++ b/src/main/java/org/apache/commons/digester3/CallMethodRule.java
@@ -20,10 +20,12 @@
*/
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 @@
|| ( 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 @@
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 );