commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r1127268 - /commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/binder/SetPropertiesBuilder.java
Date Tue, 24 May 2011 20:25:55 GMT
Author: simonetripodi
Date: Tue May 24 20:25:55 2011
New Revision: 1127268

URL: http://svn.apache.org/viewvc?rev=1127268&view=rev
Log:
added ignoreAttribute(String) method

Modified:
    commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/binder/SetPropertiesBuilder.java

Modified: commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/binder/SetPropertiesBuilder.java
URL: http://svn.apache.org/viewvc/commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/binder/SetPropertiesBuilder.java?rev=1127268&r1=1127267&r2=1127268&view=diff
==============================================================================
--- commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/binder/SetPropertiesBuilder.java
(original)
+++ commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/binder/SetPropertiesBuilder.java
Tue May 24 20:25:55 2011
@@ -59,6 +59,25 @@ public final class SetPropertiesBuilder
     }
 
     /**
+     * Add an attribute name to the ignore list.
+     *
+     * @param attributeName The attribute to match has to be ignored
+     * @return this builder instance
+     */
+    public SetPropertiesBuilder ignoreAttribute( String attributeName )
+    {
+        if ( attributeName == null )
+        {
+            reportError( "setProperties().ignoreAttribute( String )", "empty 'attributeName'
not allowed" );
+        }
+        else
+        {
+            addAlias( attributeName, null );
+        }
+        return this;
+    }
+
+    /**
      * Sets whether attributes found in the XML without matching properties should be ignored.
      * 
      * If set to false, the parsing will throw an {@code NoSuchMethodException}



Mime
View raw message