commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r1234323 - in /commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2: Argument.java DefaultClassAccessor.java
Date Sat, 21 Jan 2012 13:46:58 GMT
Author: simonetripodi
Date: Sat Jan 21 13:46:57 2012
New Revision: 1234323

URL: http://svn.apache.org/viewvc?rev=1234323&view=rev
Log:
moved getParameterTypes() method to Argument class, needed in methods as well

Modified:
    commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/Argument.java
    commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/DefaultClassAccessor.java

Modified: commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/Argument.java
URL: http://svn.apache.org/viewvc/commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/Argument.java?rev=1234323&r1=1234322&r2=1234323&view=diff
==============================================================================
--- commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/Argument.java
(original)
+++ commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/Argument.java
Sat Jan 21 13:46:57 2012
@@ -41,6 +41,17 @@ public final class Argument<T>
         return new Argument<T>( type, value );
     }
 
+    static Class<?>[] getParameterTypes( Argument<?>...arguments )
+    {
+        int argumentsLength = arguments.length;
+        Class<?>[] parameterTypes = new Class[argumentsLength];
+        for ( int i = 0; i < argumentsLength; i++ )
+        {
+            parameterTypes[i] = arguments[i].getType();
+        }
+        return parameterTypes;
+    }
+
     private final Class<T> type;
 
     private final T value;

Modified: commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/DefaultClassAccessor.java
URL: http://svn.apache.org/viewvc/commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/DefaultClassAccessor.java?rev=1234323&r1=1234322&r2=1234323&view=diff
==============================================================================
--- commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/DefaultClassAccessor.java
(original)
+++ commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/DefaultClassAccessor.java
Sat Jan 21 13:46:57 2012
@@ -18,6 +18,7 @@ package org.apache.commons.beanutils2;
  */
 
 import static java.lang.reflect.Modifier.isPublic;
+import static org.apache.commons.beanutils2.Argument.getParameterTypes;
 import static org.apache.commons.beanutils2.Assertions.checkNotNull;
 import static org.apache.commons.beanutils2.TypeUtils.isAssignmentCompatible;
 
@@ -107,17 +108,6 @@ final class DefaultClassAccessor<B>
         return new DefaultBeanAccessor<B>( bean );
     }
 
-    private static Class<?>[] getParameterTypes( Argument<?>...arguments )
-    {
-        int argumentsLength = arguments.length;
-        Class<?>[] parameterTypes = new Class[argumentsLength];
-        for ( int i = 0; i < argumentsLength; i++ )
-        {
-            parameterTypes[i] = arguments[i].getType();
-        }
-        return parameterTypes;
-    }
-
     /**
      * <p>Find an accessible constructor with compatible parameters.
      * Compatible parameters mean that every method parameter is assignable from



Mime
View raw message