commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r1348204 - in /commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2: BeanProperties.java DefaultBeanProperties.java
Date Fri, 08 Jun 2012 19:36:41 GMT
Author: simonetripodi
Date: Fri Jun  8 19:36:41 2012
New Revision: 1348204

URL: http://svn.apache.org/viewvc?rev=1348204&view=rev
Log:
added missing getIndexedWriteMethod

Modified:
    commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/BeanProperties.java
    commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/DefaultBeanProperties.java

Modified: commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/BeanProperties.java
URL: http://svn.apache.org/viewvc/commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/BeanProperties.java?rev=1348204&r1=1348203&r2=1348204&view=diff
==============================================================================
--- commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/BeanProperties.java
(original)
+++ commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/BeanProperties.java
Fri Jun  8 19:36:41 2012
@@ -102,6 +102,16 @@ public interface BeanProperties<B>
 
     /**
      *
+     * @param propertyName
+     * @return
+     * @throws NoSuchMethodException
+     * @throws IntrospectionException
+     */
+    public abstract Method getIndexedWriteMethod( String propertyName )
+        throws NoSuchMethodException, IntrospectionException;
+
+    /**
+     *
      * @return
      * @throws IntrospectionException
      */

Modified: commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/DefaultBeanProperties.java
URL: http://svn.apache.org/viewvc/commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/DefaultBeanProperties.java?rev=1348204&r1=1348203&r2=1348204&view=diff
==============================================================================
--- commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/DefaultBeanProperties.java
(original)
+++ commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/DefaultBeanProperties.java
Fri Jun  8 19:36:41 2012
@@ -148,6 +148,19 @@ final class DefaultBeanProperties<B>
                             beanClass.getName(), propertyName );
     }
 
+    /**
+     * {@inheritDoc}
+     */
+    public Method getIndexedWriteMethod( String propertyName )
+        throws NoSuchMethodException, IntrospectionException
+    {
+        IndexedPropertyDescriptor indexedPropertyDescriptor = getIndexedPropertyDescriptor(
propertyName );
+
+        return checkMethod( indexedPropertyDescriptor.getIndexedWriteMethod(),
+                            "Bean of type %s does not provide a getter for indexed property
'%s'!",
+                            beanClass.getName(), propertyName );
+    }
+
     private static Method checkMethod( Method method, String errorMessageTemplate, Object...arsg
)
         throws NoSuchMethodException
     {



Mime
View raw message