Return-Path: Delivered-To: apmail-commons-commits-archive@minotaur.apache.org Received: (qmail 95039 invoked from network); 1 Feb 2011 12:40:37 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 1 Feb 2011 12:40:37 -0000 Received: (qmail 49565 invoked by uid 500); 1 Feb 2011 12:40:37 -0000 Delivered-To: apmail-commons-commits-archive@commons.apache.org Received: (qmail 49214 invoked by uid 500); 1 Feb 2011 12:40:34 -0000 Mailing-List: contact commits-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commons.apache.org Delivered-To: mailing list commits@commons.apache.org Received: (qmail 49070 invoked by uid 99); 1 Feb 2011 12:40:34 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Feb 2011 12:40:34 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Feb 2011 12:40:33 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 3DF37238890A; Tue, 1 Feb 2011 12:40:13 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1066032 - /commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/RulesBinderImpl.java Date: Tue, 01 Feb 2011 12:40:13 -0000 To: commits@commons.apache.org From: simonetripodi@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20110201124013.3DF37238890A@eris.apache.org> Author: simonetripodi Date: Tue Feb 1 12:40:12 2011 New Revision: 1066032 URL: http://svn.apache.org/viewvc?rev=1066032&view=rev Log: added the method to create and store Digester Rule to proper Rules implementation Modified: commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/RulesBinderImpl.java Modified: commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/RulesBinderImpl.java URL: http://svn.apache.org/viewvc/commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/RulesBinderImpl.java?rev=1066032&r1=1066031&r2=1066032&view=diff ============================================================================== --- commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/RulesBinderImpl.java (original) +++ commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/RulesBinderImpl.java Tue Feb 1 12:40:12 2011 @@ -38,6 +38,7 @@ import org.apache.commons.digester3.rule import org.apache.commons.digester3.rulesbinder.SetPropertiesBuilder; import org.apache.commons.digester3.rulesbinder.SetPropertyBuilder; import org.apache.commons.digester3.spi.RuleProvider; +import org.apache.commons.digester3.spi.Rules; /** * The Digester EDSL implementation. @@ -513,6 +514,18 @@ final class RulesBinderImpl implements R } /** + * Invokes the bound providers, then create the rule and associate it to the related pattern, + * storing them in the proper {@link Rules} implementation data structure. + * + * @param rules The {@link Rules} implementation to store the produced {@link Rule}s + */ + public void populateRules(Rules rules) { + for (RegisteredProvider registeredProvider : this.providers) { + rules.add(registeredProvider.getPattern(), registeredProvider.getProvider().get()); + } + } + + /** * Used to associate rule providers with paths in the rules binder. */ private static class RegisteredProvider {