Author: simonetripodi
Date: Sat Jan 29 22:23:09 2011
New Revision: 1065127

URL: http://svn.apache.org/viewvc?rev=1065127&view=rev
Log:
avoid method overloading method for factoryCreate(), options specified via 
chained builder

Modified:
    
commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/rulesbinder/LinkedFactoryCreateBuilder.java
    
commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/rulesbinder/LinkedRuleBuilder.java

Modified: 
commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/rulesbinder/LinkedFactoryCreateBuilder.java
URL: 
http://svn.apache.org/viewvc/commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/rulesbinder/LinkedFactoryCreateBuilder.java?rev=1065127&r1=1065126&r2=1065127&view=diff
==============================================================================
--- 
commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/rulesbinder/LinkedFactoryCreateBuilder.java
 (original)
+++ 
commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/rulesbinder/LinkedFactoryCreateBuilder.java
 Sat Jan 29 22:23:09 2011
@@ -17,12 +17,41 @@
  */
 package org.apache.commons.digester3.rulesbinder;
 
+import org.apache.commons.digester3.spi.ObjectCreationFactory;
+
 /**
  * Builder chained when invoking {@link 
LinkedRuleBuilder#factoryCreate(String)}.
  */
 public interface LinkedFactoryCreateBuilder extends BackToLinkedRuleBuilder {
 
     /**
+     * Construct a factory create rule that will use the specified class name 
to create an {@link ObjectCreationFactory}
+     * which will then be used to create an object and push it on the stack.
+     *
+     * @param className Java class name of the object creation factory class
+     * @return this builder instance
+     */
+    LinkedFactoryCreateBuilder ofType(String className);
+
+    /**
+     * Construct a factory create rule that will use the specified class to 
create an {@link ObjectCreationFactory}
+     * which will then be used to create an object and push it on the stack.
+     *
+     * @param type Java class of the object creation factory class
+     * @return this builder instance
+     */
+    LinkedFactoryCreateBuilder ofType(Class<?> type);
+
+    /**
+     * Construct a factory create rule using the given, already instantiated, 
{@link ObjectCreationFactory}.
+     *
+     * @param <T> the type of created object by the given factory
+     * @param creationFactory called on to create the object
+     * @return this builder instance
+     */
+    <T> LinkedFactoryCreateBuilder usingFactory(ObjectCreationFactory<T> 
creationFactory);
+
+    /**
      * Allows specify the attribute containing an override class name if it is 
present.
      *
      * @param attributeName The attribute containing an override class name if 
it is present

Modified: 
commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/rulesbinder/LinkedRuleBuilder.java
URL: 
http://svn.apache.org/viewvc/commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/rulesbinder/LinkedRuleBuilder.java?rev=1065127&r1=1065126&r2=1065127&view=diff
==============================================================================
--- 
commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/rulesbinder/LinkedRuleBuilder.java
 (original)
+++ 
commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/rulesbinder/LinkedRuleBuilder.java
 Sat Jan 29 22:23:09 2011
@@ -60,26 +60,8 @@ public interface LinkedRuleBuilder {
      * Uses an {@link ObjectCreationFactory} to create a new object which it 
pushes onto the object stack.
      *
      * When the element is complete, the object will be popped.
-     *
-     * @param className Java class name of the object creation factory class
-     */
-    LinkedFactoryCreateBuilder factoryCreate(String className);
-
-    /**
-     * Construct a factory create rule that will use the specified class to 
create an {@link ObjectCreationFactory}
-     * which will then be used to create an object and push it on the stack.
-     *
-     * @param clazz Java class of the object creation factory class
-     */
-    LinkedFactoryCreateBuilder factoryCreate(Class<?> clazz);
-
-    /**
-     * Construct a factory create rule using the given, already instantiated, 
{@link ObjectCreationFactory}.
-     *
-     * @param <T> the type of created object by the given factory
-     * @param creationFactory called on to create the object
      */
-    <T> LinkedFactoryCreateBuilder factoryCreate(ObjectCreationFactory<T> 
creationFactory);
+    LinkedFactoryCreateBuilder factoryCreate();
 
     /**
      * Construct an object with the specified class name.


Reply via email to