commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r1073825 - /commons/sandbox/digester3/trunk/src/site/xdoc/guide/plugins.xml
Date Wed, 23 Feb 2011 16:52:01 GMT
Author: simonetripodi
Date: Wed Feb 23 16:52:00 2011
New Revision: 1073825

URL: http://svn.apache.org/viewvc?rev=1073825&view=rev
Log:
minor format

Modified:
    commons/sandbox/digester3/trunk/src/site/xdoc/guide/plugins.xml

Modified: commons/sandbox/digester3/trunk/src/site/xdoc/guide/plugins.xml
URL: http://svn.apache.org/viewvc/commons/sandbox/digester3/trunk/src/site/xdoc/guide/plugins.xml?rev=1073825&r1=1073824&r2=1073825&view=diff
==============================================================================
--- commons/sandbox/digester3/trunk/src/site/xdoc/guide/plugins.xml (original)
+++ commons/sandbox/digester3/trunk/src/site/xdoc/guide/plugins.xml Wed Feb 23 16:52:00 2011
@@ -51,30 +51,22 @@ Given the following digester rules in th
         @Override
         protected void configure() {
             forPattern("pipeline")
-                .createObject()
-                    .ofType(Pipeline.class);
+                .createObject().ofType(Pipeline.class);
 
             forPattern("pipeline/source")
-                .callMethod("setSource")
-                    .withParamCount(1)
+                .callMethod("setSource").withParamCount(1)
                 .then()
-                .callParam()
-                    .ofIndex(0)
-                    .fromAttribute("file");
+                .callParam().ofIndex(0).fromAttribute("file");
 
             forPattern("pipeline/transform")
-                .createPlugin()
-                    .ofType(Transform.class)
+                .createPlugin().ofType(Transform.class)
                 .then()
                 .setNext("setTransform");
 
             forPattern("pipeline/destination")
-                .callMethod("setDest")
-                    .withParamCount(1)
+                .callMethod("setDest").withParamCount(1)
                 .then()
-                .callParam()
-                    .ofIndex(0)
-                    .fromAttribute("file");
+                .callParam().ofIndex(0).fromAttribute("file");
         }
 
     });
@@ -230,7 +222,7 @@ the rule info may have any name of your 
 <p>
 Here is the addRules method on class SubstituteTransform, from the example:</p>
 <source>
-    public static void addRules(Digester d, String pathPrefix) {
+    public static void addRules(final Digester d, final String pathPrefix) {
         newLoader(new AbstractRulesModule() {
 
             @Override
@@ -239,13 +231,11 @@ Here is the addRules method on class Sub
                 // define any object of type Widget. Because a Container is
                 // itself a widget, this allows us to build trees of objects.
                 forPattern(pattern + "/from")
-                    .callMethod("setFrom")
-                        .usingElementBodyAsArgument();
+                    .callMethod("setFrom").usingElementBodyAsArgument();
 
                 // allow users to declare plugins under a container as well
                 forPattern(pattern + "/to")
-                    .callMethod("setTo")
-                        .usingElementBodyAsArgument();
+                    .callMethod("setTo").usingElementBodyAsArgument();
             }
 
         }).decorate(digester.getRules());



Mime
View raw message