commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rdon...@apache.org
Subject cvs commit: jakarta-commons/digester/src/test/org/apache/commons/digester BeanPropertySetterRuleTestCase.java DigesterTestCase.java EBRTestCase.java RulesBaseTestCase.java TestRule.java
Date Sat, 23 Mar 2002 17:45:59 GMT
rdonkin     02/03/23 09:45:59

  Modified:    digester/src/java/org/apache/commons/digester
                        BeanPropertySetterRule.java CallMethodRule.java
                        CallParamRule.java Digester.java
                        FactoryCreateRule.java ObjectCreateRule.java
                        Rule.java SetNextRule.java SetPropertiesRule.java
                        SetPropertyRule.java SetRootRule.java
                        SetTopRule.java
               digester/src/test/org/apache/commons/digester
                        BeanPropertySetterRuleTestCase.java
                        DigesterTestCase.java EBRTestCase.java
                        RulesBaseTestCase.java TestRule.java
  Log:
  Depricated Rule(Digester digester) constructor. Also depricated relevant constructors on rule subclasses and added new corresponding constructors. Modified Digester so that it uses the new constructors.
  
  Revision  Changes    Path
  1.8       +33 -7     jakarta-commons/digester/src/java/org/apache/commons/digester/BeanPropertySetterRule.java
  
  Index: BeanPropertySetterRule.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/BeanPropertySetterRule.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- BeanPropertySetterRule.java	23 Jan 2002 22:38:01 -0000	1.7
  +++ BeanPropertySetterRule.java	23 Mar 2002 17:45:57 -0000	1.8
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/BeanPropertySetterRule.java,v 1.7 2002/01/23 22:38:01 sanders Exp $
  - * $Revision: 1.7 $
  - * $Date: 2002/01/23 22:38:01 $
  + * $Header: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/BeanPropertySetterRule.java,v 1.8 2002/03/23 17:45:57 rdonkin Exp $
  + * $Revision: 1.8 $
  + * $Date: 2002/03/23 17:45:57 $
    *
    * ====================================================================
    *
  @@ -81,7 +81,7 @@
    * on the parent object.</p>
    *
    * @author Robert Burrell Donkin
  - * @version $Revision: 1.7 $ $Date: 2002/01/23 22:38:01 $
  + * @version $Revision: 1.8 $ $Date: 2002/03/23 17:45:57 $
    */
   
   public class BeanPropertySetterRule extends Rule {
  @@ -95,11 +95,13 @@
        *
        * @param digester associated <code>Digester</code>
        * @param propertyName name of property to set
  +     *
  +     * @deprecated The digester instance is now set in the {@link Digester#addRule} method. 
  +     * Use {@link #BeanPropertySetterRule(String propertyName)} instead.
        */
       public BeanPropertySetterRule(Digester digester, String propertyName) {
   
  -        super(digester);
  -        this.propertyName = propertyName;
  +        this(propertyName);
   
       }
   
  @@ -110,14 +112,38 @@
        * on the top object named the same as the current element.
        *
        * @param digester associated <code>Digester</code>
  +     *     
  +     * @deprecated The digester instance is now set in the {@link Digester#addRule} method. 
  +     * Use {@link #BeanPropertySetterRule()} instead.
        */
       public BeanPropertySetterRule(Digester digester) {
   
  -        this(digester, null);
  +        this();
  +
  +    }
  +
  +    /**
  +     * <p>Construct rule that sets the given property from the body text.</p>
  +     *
  +     * @param propertyName name of property to set
  +     */
  +    public BeanPropertySetterRule(String propertyName) {
  +
  +        this.propertyName = propertyName;
   
       }
   
  +    /**
  +     * <p>Construct rule that automatically sets a property from the body text.
  +     *
  +     * <p> This construct creates a rule that sets the property
  +     * on the top object named the same as the current element.
  +     */
  +    public BeanPropertySetterRule() {
  +
  +        this((String)null);
   
  +    }
       // ----------------------------------------------------- Instance Variables
   
   
  
  
  
  1.15      +76 -10    jakarta-commons/digester/src/java/org/apache/commons/digester/CallMethodRule.java
  
  Index: CallMethodRule.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/CallMethodRule.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- CallMethodRule.java	23 Jan 2002 21:25:22 -0000	1.14
  +++ CallMethodRule.java	23 Mar 2002 17:45:57 -0000	1.15
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/CallMethodRule.java,v 1.14 2002/01/23 21:25:22 sanders Exp $
  - * $Revision: 1.14 $
  - * $Date: 2002/01/23 21:25:22 $
  + * $Header: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/CallMethodRule.java,v 1.15 2002/03/23 17:45:57 rdonkin Exp $
  + * $Revision: 1.15 $
  + * $Date: 2002/03/23 17:45:57 $
    *
    * ====================================================================
    *
  @@ -79,7 +79,7 @@
    *
    * @author Craig McClanahan
    * @author Scott Sanders
  - * @version $Revision: 1.14 $ $Date: 2002/01/23 21:25:22 $
  + * @version $Revision: 1.15 $ $Date: 2002/03/23 17:45:57 $
    */
   
   public class CallMethodRule extends Rule {
  @@ -96,11 +96,15 @@
        * @param methodName Method name of the parent method to call
        * @param paramCount The number of parameters to collect, or
        *  zero for a single argument from the body of this element.
  +     *
  +     *
  +     * @deprecated The digester instance is now set in the {@link Digester#addRule} method. 
  +     * Use {@link #CallMethodRule(String methodName,int paramCount)} instead.
        */
       public CallMethodRule(Digester digester, String methodName,
                             int paramCount) {
   
  -        this(digester, methodName, paramCount, (Class[]) null);
  +        this(methodName, paramCount);
   
       }
   
  @@ -116,11 +120,73 @@
        *  (if you wish to use a primitive type, specify the corresonding
        *  Java wrapper class instead, such as <code>java.lang.Boolean</code>
        *  for a <code>boolean</code> parameter)
  +     *
  +     * @deprecated The digester instance is now set in the {@link Digester#addRule} method. 
  +     * Use {@link #CallMethodRule(String methodName,int paramCount, String [] paramTypes)} instead.
        */
       public CallMethodRule(Digester digester, String methodName,
                             int paramCount, String paramTypes[]) {
   
  -        super(digester);
  +        this(methodName, paramCount, paramTypes);
  +
  +    }
  +
  +
  +    /**
  +     * Construct a "call method" rule with the specified method name.
  +     *
  +     * @param digester The associated Digester
  +     * @param methodName Method name of the parent method to call
  +     * @param paramCount The number of parameters to collect, or
  +     *  zero for a single argument from the body of ths element
  +     * @param paramTypes The Java classes that represent the
  +     *  parameter types of the method arguments
  +     *  (if you wish to use a primitive type, specify the corresonding
  +     *  Java wrapper class instead, such as <code>java.lang.Boolean.TYPE</code>
  +     *  for a <code>boolean</code> parameter)
  +     *
  +     * @deprecated The digester instance is now set in the {@link Digester#addRule} method. 
  +     * Use {@link #CallMethodRule(String methodName,int paramCount, Class [] paramTypes)} instead.
  +     */
  +    public CallMethodRule(Digester digester, String methodName,
  +                          int paramCount, Class paramTypes[]) {
  +
  +        this(methodName, paramCount, paramTypes);
  +    }
  +
  +
  +    /**
  +     * Construct a "call method" rule with the specified method name.  The
  +     * parameter types (if any) default to java.lang.String.
  +     *
  +     * @param methodName Method name of the parent method to call
  +     * @param paramCount The number of parameters to collect, or
  +     *  zero for a single argument from the body of this element.
  +     */
  +    public CallMethodRule(String methodName,
  +                          int paramCount) {
  +
  +        this( methodName, paramCount, (Class[]) null);
  +
  +    }
  +
  +
  +    /**
  +     * Construct a "call method" rule with the specified method name.
  +     *
  +     * @param methodName Method name of the parent method to call
  +     * @param paramCount The number of parameters to collect, or
  +     *  zero for a single argument from the body of ths element
  +     * @param paramTypes The Java class names of the arguments
  +     *  (if you wish to use a primitive type, specify the corresonding
  +     *  Java wrapper class instead, such as <code>java.lang.Boolean</code>
  +     *  for a <code>boolean</code> parameter)
  +     */
  +    public CallMethodRule(
  +                            String methodName,
  +                            int paramCount, 
  +                            String paramTypes[]) {
  +
           this.methodName = methodName;
           this.paramCount = paramCount;
           if (paramTypes == null) {
  @@ -146,7 +212,6 @@
       /**
        * Construct a "call method" rule with the specified method name.
        *
  -     * @param digester The associated Digester
        * @param methodName Method name of the parent method to call
        * @param paramCount The number of parameters to collect, or
        *  zero for a single argument from the body of ths element
  @@ -156,10 +221,11 @@
        *  Java wrapper class instead, such as <code>java.lang.Boolean.TYPE</code>
        *  for a <code>boolean</code> parameter)
        */
  -    public CallMethodRule(Digester digester, String methodName,
  -                          int paramCount, Class paramTypes[]) {
  +    public CallMethodRule(
  +                            String methodName,
  +                            int paramCount, 
  +                            Class paramTypes[]) {
   
  -        super(digester);
           this.methodName = methodName;
           this.paramCount = paramCount;
           if (paramTypes == null) {
  
  
  
  1.7       +38 -6     jakarta-commons/digester/src/java/org/apache/commons/digester/CallParamRule.java
  
  Index: CallParamRule.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/CallParamRule.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- CallParamRule.java	9 Jan 2002 20:22:49 -0000	1.6
  +++ CallParamRule.java	23 Mar 2002 17:45:57 -0000	1.7
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/CallParamRule.java,v 1.6 2002/01/09 20:22:49 sanders Exp $
  - * $Revision: 1.6 $
  - * $Date: 2002/01/09 20:22:49 $
  + * $Header: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/CallParamRule.java,v 1.7 2002/03/23 17:45:57 rdonkin Exp $
  + * $Revision: 1.7 $
  + * $Date: 2002/03/23 17:45:57 $
    *
    * ====================================================================
    *
  @@ -74,7 +74,7 @@
    * by a surrounding CallMethodRule rule.
    *
    * @author Craig McClanahan
  - * @version $Revision: 1.6 $ $Date: 2002/01/09 20:22:49 $
  + * @version $Revision: 1.7 $ $Date: 2002/03/23 17:45:57 $
    */
   
   public class CallParamRule extends Rule {
  @@ -89,10 +89,13 @@
        *
        * @param digester The associated Digester
        * @param paramIndex The zero-relative parameter number
  +     *
  +     * @deprecated The digester instance is now set in the {@link Digester#addRule} method. 
  +     * Use {@link #CallParamRule(int paramIndex)} instead.
        */
       public CallParamRule(Digester digester, int paramIndex) {
   
  -        this(digester, paramIndex, null);
  +        this(paramIndex);
   
       }
   
  @@ -104,11 +107,40 @@
        * @param digester The associated Digester
        * @param paramIndex The zero-relative parameter number
        * @param attributeName The name of the attribute to save
  +     *
  +     * @deprecated The digester instance is now set in the {@link Digester#addRule} method. 
  +     * Use {@link #CallParamRule(int paramIndex, String attributeName)} instead.
        */
       public CallParamRule(Digester digester, int paramIndex,
                            String attributeName) {
   
  -        super(digester);
  +        this(paramIndex, attributeName);
  +
  +    }
  +
  +    /**
  +     * Construct a "call parameter" rule that will save the body text of this
  +     * element as the parameter value.
  +     *
  +     * @param paramIndex The zero-relative parameter number
  +     */
  +    public CallParamRule(int paramIndex) {
  +
  +        this(paramIndex, null);
  +
  +    }
  +
  +
  +    /**
  +     * Construct a "call parameter" rule that will save the value of the
  +     * specified attribute as the parameter value.
  +     *
  +     * @param paramIndex The zero-relative parameter number
  +     * @param attributeName The name of the attribute to save
  +     */
  +    public CallParamRule(int paramIndex,
  +                         String attributeName) {
  +
           this.paramIndex = paramIndex;
           this.attributeName = attributeName;
   
  
  
  
  1.50      +34 -30    jakarta-commons/digester/src/java/org/apache/commons/digester/Digester.java
  
  Index: Digester.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/Digester.java,v
  retrieving revision 1.49
  retrieving revision 1.50
  diff -u -r1.49 -r1.50
  --- Digester.java	20 Mar 2002 20:28:28 -0000	1.49
  +++ Digester.java	23 Mar 2002 17:45:57 -0000	1.50
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/Digester.java,v 1.49 2002/03/20 20:28:28 rdonkin Exp $
  - * $Revision: 1.49 $
  - * $Date: 2002/03/20 20:28:28 $
  + * $Header: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/Digester.java,v 1.50 2002/03/23 17:45:57 rdonkin Exp $
  + * $Revision: 1.50 $
  + * $Date: 2002/03/23 17:45:57 $
    *
    * ====================================================================
    *
  @@ -112,7 +112,7 @@
    *
    * @author Craig McClanahan
    * @author Scott Sanders
  - * @version $Revision: 1.49 $ $Date: 2002/03/20 20:28:28 $
  + * @version $Revision: 1.50 $ $Date: 2002/03/23 17:45:57 $
    */
   
   public class Digester extends DefaultHandler {
  @@ -1404,7 +1404,7 @@
       public void addBeanPropertySetter(String pattern) {
   
           addRule(pattern,
  -                new BeanPropertySetterRule(this));
  +                new BeanPropertySetterRule());
   
       }
   
  @@ -1419,7 +1419,7 @@
                                         String propertyName) {
   
           addRule(pattern,
  -                new BeanPropertySetterRule(this, propertyName));
  +                new BeanPropertySetterRule(propertyName));
   
       }
   
  @@ -1436,7 +1436,7 @@
                                 int paramCount) {
   
           addRule(pattern,
  -                new CallMethodRule(this, methodName, paramCount));
  +                new CallMethodRule(methodName, paramCount));
   
       }
   
  @@ -1458,8 +1458,10 @@
                                 int paramCount, String paramTypes[]) {
   
           addRule(pattern,
  -                new CallMethodRule(this, methodName,
  -                        paramCount, paramTypes));
  +                new CallMethodRule(
  +                                    methodName,
  +                                    paramCount, 
  +                                    paramTypes));
   
       }
   
  @@ -1480,8 +1482,10 @@
                                 int paramCount, Class paramTypes[]) {
   
           addRule(pattern,
  -                new CallMethodRule(this, methodName,
  -                        paramCount, paramTypes));
  +                new CallMethodRule(
  +                                    methodName,
  +                                    paramCount, 
  +                                    paramTypes));
   
       }
   
  @@ -1496,7 +1500,7 @@
       public void addCallParam(String pattern, int paramIndex) {
   
           addRule(pattern,
  -                new CallParamRule(this, paramIndex));
  +                new CallParamRule(paramIndex));
   
       }
   
  @@ -1514,7 +1518,7 @@
                                String attributeName) {
   
           addRule(pattern,
  -                new CallParamRule(this, paramIndex, attributeName));
  +                new CallParamRule(paramIndex, attributeName));
   
       }
   
  @@ -1528,7 +1532,7 @@
       public void addFactoryCreate(String pattern, String className) {
   
           addRule(pattern,
  -                new FactoryCreateRule(this, className));
  +                new FactoryCreateRule(className));
   
       }
   
  @@ -1542,7 +1546,7 @@
       public void addFactoryCreate(String pattern, Class clazz) {
   
           addRule(pattern,
  -                new FactoryCreateRule(this, clazz));
  +                new FactoryCreateRule(clazz));
   
       }
   
  @@ -1559,7 +1563,7 @@
                                    String attributeName) {
   
           addRule(pattern,
  -                new FactoryCreateRule(this, className, attributeName));
  +                new FactoryCreateRule(className, attributeName));
   
       }
   
  @@ -1576,7 +1580,7 @@
                                    String attributeName) {
   
           addRule(pattern,
  -                new FactoryCreateRule(this, clazz, attributeName));
  +                new FactoryCreateRule(clazz, attributeName));
   
       }
   
  @@ -1593,7 +1597,7 @@
   
           creationFactory.setDigester(this);
           addRule(pattern,
  -                new FactoryCreateRule(this, creationFactory));
  +                new FactoryCreateRule(creationFactory));
   
       }
   
  @@ -1607,7 +1611,7 @@
       public void addObjectCreate(String pattern, String className) {
   
           addRule(pattern,
  -                new ObjectCreateRule(this, className));
  +                new ObjectCreateRule(className));
   
       }
   
  @@ -1621,7 +1625,7 @@
       public void addObjectCreate(String pattern, Class clazz) {
   
           addRule(pattern,
  -                new ObjectCreateRule(this, clazz));
  +                new ObjectCreateRule(clazz));
   
       }
   
  @@ -1638,7 +1642,7 @@
                                   String attributeName) {
   
           addRule(pattern,
  -                new ObjectCreateRule(this, className, attributeName));
  +                new ObjectCreateRule(className, attributeName));
   
       }
   
  @@ -1656,7 +1660,7 @@
                                   Class clazz) {
   
           addRule(pattern,
  -                new ObjectCreateRule(this, attributeName, clazz));
  +                new ObjectCreateRule(attributeName, clazz));
   
       }
   
  @@ -1670,7 +1674,7 @@
       public void addSetNext(String pattern, String methodName) {
   
           addRule(pattern,
  -                new SetNextRule(this, methodName));
  +                new SetNextRule(methodName));
   
       }
   
  @@ -1689,7 +1693,7 @@
                              String paramType) {
   
           addRule(pattern,
  -                new SetNextRule(this, methodName, paramType));
  +                new SetNextRule(methodName, paramType));
   
       }
   
  @@ -1703,7 +1707,7 @@
       public void addSetRoot(String pattern, String methodName) {
   
           addRule(pattern,
  -                new SetRootRule(this, methodName));
  +                new SetRootRule(methodName));
   
       }
   
  @@ -1719,7 +1723,7 @@
                              String paramType) {
   
           addRule(pattern,
  -                new SetRootRule(this, methodName, paramType));
  +                new SetRootRule(methodName, paramType));
   
       }
   
  @@ -1731,7 +1735,7 @@
       public void addSetProperties(String pattern) {
   
           addRule(pattern,
  -                new SetPropertiesRule(this));
  +                new SetPropertiesRule());
   
       }
   
  @@ -1746,7 +1750,7 @@
       public void addSetProperty(String pattern, String name, String value) {
   
           addRule(pattern,
  -                new SetPropertyRule(this, name, value));
  +                new SetPropertyRule(name, value));
   
       }
   
  @@ -1760,7 +1764,7 @@
       public void addSetTop(String pattern, String methodName) {
   
           addRule(pattern,
  -                new SetTopRule(this, methodName));
  +                new SetTopRule(methodName));
   
       }
   
  @@ -1779,7 +1783,7 @@
                             String paramType) {
   
           addRule(pattern,
  -                new SetTopRule(this, methodName, paramType));
  +                new SetTopRule(methodName, paramType));
   
       }
   
  
  
  
  1.9       +95 -9     jakarta-commons/digester/src/java/org/apache/commons/digester/FactoryCreateRule.java
  
  Index: FactoryCreateRule.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/FactoryCreateRule.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- FactoryCreateRule.java	23 Jan 2002 21:25:22 -0000	1.8
  +++ FactoryCreateRule.java	23 Mar 2002 17:45:58 -0000	1.9
  @@ -73,7 +73,7 @@
    * in a call to either a factory method or to a non-empty constructor.
    *
    * @author Robert Burrell Donkin
  - * @version $Revision: 1.8 $ $Date: 2002/01/23 21:25:22 $
  + * @version $Revision: 1.9 $ $Date: 2002/03/23 17:45:58 $
    */
   
   public class FactoryCreateRule extends Rule {
  @@ -89,10 +89,13 @@
        *
        * @param digester The associated Digester
        * @param className Java class name of the object creation factory class
  +     *
  +     * @deprecated The digester instance is now set in the {@link Digester#addRule} method. 
  +     * Use {@link #FactoryCreateRule(String className)} instead.
        */
       public FactoryCreateRule(Digester digester, String className) {
   
  -        this(digester, className, null);
  +        this(className);
   
       }
   
  @@ -104,10 +107,13 @@
        *
        * @param digester The associated Digester
        * @param clazz Java class name of the object creation factory class
  +     *
  +     * @deprecated The digester instance is now set in the {@link Digester#addRule} method. 
  +     * Use {@link #FactoryCreateRule(Class clazz)} instead.
        */
       public FactoryCreateRule(Digester digester, Class clazz) {
   
  -        this(digester, clazz, null);
  +        this(clazz);
   
       }
   
  @@ -122,13 +128,14 @@
        * @param className Default Java class name of the factory class
        * @param attributeName Attribute name which, if present, contains an
        *  override of the class name of the object creation factory to create.
  +     *
  +     * @deprecated The digester instance is now set in the {@link Digester#addRule} method. 
  +     * Use {@link #FactoryCreateRule(String className, String attributeName)} instead.
        */
       public FactoryCreateRule(Digester digester,
                                String className, String attributeName) {
   
  -        super(digester);
  -        this.className = className;
  -        this.attributeName = attributeName;
  +        this(className, attributeName);
   
       }
   
  @@ -143,11 +150,14 @@
        * @param clazz Default Java class name of the factory class
        * @param attributeName Attribute name which, if present, contains an
        *  override of the class name of the object creation factory to create.
  +     *
  +     * @deprecated The digester instance is now set in the {@link Digester#addRule} method. 
  +     * Use {@link #FactoryCreateRule(Class clazz, String attributeName)} instead.
        */
       public FactoryCreateRule(Digester digester,
                                Class clazz, String attributeName) {
   
  -        this(digester, clazz.getName(), attributeName);
  +        this(clazz, attributeName);
   
       }
   
  @@ -158,15 +168,91 @@
        *
        * @param digester The associated Digester
        * @param creationFactory called on to create the object.
  +     *
  +     * @deprecated The digester instance is now set in the {@link Digester#addRule} method. 
  +     * Use {@link #FactoryCreateRule(ObjectCreationFactory creationFactory)} instead.
        */
       public FactoryCreateRule(Digester digester,
                                ObjectCreationFactory creationFactory) {
   
  -        super(digester);
  -        this.creationFactory = creationFactory;
  +        this(creationFactory);
  +
  +    }    
  +
  +    /**
  +     * 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
  +     */
  +    public FactoryCreateRule(String className) {
  +
  +        this(className, null);
   
       }
   
  +
  +    /**
  +     * 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 name of the object creation factory class
  +     */
  +    public FactoryCreateRule(Class clazz) {
  +
  +        this(clazz, null);
  +
  +    }
  +
  +
  +    /**
  +     * Construct a factory create rule that will use the specified
  +     * class name (possibly overridden by the specified attribute if present)
  +     * to create an {@link ObjectCreationFactory}, which will then be used
  +     * to instantiate an object instance and push it onto the stack.
  +     *
  +     * @param className Default Java class name of the factory class
  +     * @param attributeName Attribute name which, if present, contains an
  +     *  override of the class name of the object creation factory to create.
  +     */
  +    public FactoryCreateRule(String className, String attributeName) {
  +
  +        this.className = className;
  +        this.attributeName = attributeName;
  +
  +    }
  +
  +
  +    /**
  +     * Construct a factory create rule that will use the specified
  +     * class (possibly overridden by the specified attribute if present)
  +     * to create an {@link ObjectCreationFactory}, which will then be used
  +     * to instantiate an object instance and push it onto the stack.
  +     *
  +     * @param clazz Default Java class name of the factory class
  +     * @param attributeName Attribute name which, if present, contains an
  +     *  override of the class name of the object creation factory to create.
  +     */
  +    public FactoryCreateRule(Class clazz, String attributeName) {
  +
  +        this(clazz.getName(), attributeName);
  +
  +    }
  +
  +
  +    /**
  +     * Construct a factory create rule using the given, already instantiated,
  +     * {@link ObjectCreationFactory}.
  +     *
  +     * @param creationFactory called on to create the object.
  +     */
  +    public FactoryCreateRule(ObjectCreationFactory creationFactory) {
  +
  +        this.creationFactory = creationFactory;
  +
  +    }
   
       // ----------------------------------------------------- Instance Variables
   
  
  
  
  1.12      +75 -10    jakarta-commons/digester/src/java/org/apache/commons/digester/ObjectCreateRule.java
  
  Index: ObjectCreateRule.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/ObjectCreateRule.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- ObjectCreateRule.java	23 Jan 2002 21:25:22 -0000	1.11
  +++ ObjectCreateRule.java	23 Mar 2002 17:45:58 -0000	1.12
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/ObjectCreateRule.java,v 1.11 2002/01/23 21:25:22 sanders Exp $
  - * $Revision: 1.11 $
  - * $Date: 2002/01/23 21:25:22 $
  + * $Header: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/ObjectCreateRule.java,v 1.12 2002/03/23 17:45:58 rdonkin Exp $
  + * $Revision: 1.12 $
  + * $Date: 2002/03/23 17:45:58 $
    *
    * ====================================================================
    *
  @@ -73,7 +73,7 @@
    *
    * @author Craig McClanahan
    * @author Scott Sanders
  - * @version $Revision: 1.11 $ $Date: 2002/01/23 21:25:22 $
  + * @version $Revision: 1.12 $ $Date: 2002/03/23 17:45:58 $
    */
   
   public class ObjectCreateRule extends Rule {
  @@ -87,10 +87,13 @@
        *
        * @param digester The associated Digester
        * @param className Java class name of the object to be created
  +     *
  +     * @deprecated The digester instance is now set in the {@link Digester#addRule} method. 
  +     * Use {@link #ObjectCreateRule(String className)} instead.
        */
       public ObjectCreateRule(Digester digester, String className) {
   
  -        this(digester, className, (String) null);
  +        this(className);
   
       }
   
  @@ -100,10 +103,13 @@
        *
        * @param digester The associated Digester
        * @param clazz Java class name of the object to be created
  +     *
  +     * @deprecated The digester instance is now set in the {@link Digester#addRule} method. 
  +     * Use {@link #ObjectCreateRule(Class clazz)} instead.
        */
       public ObjectCreateRule(Digester digester, Class clazz) {
   
  -        this(digester, clazz.getName(), (String) null);
  +        this(clazz);
   
       }
   
  @@ -116,13 +122,14 @@
        * @param className Java class name of the object to be created
        * @param attributeName Attribute name which, if present, contains an
        *  override of the class name to create
  +     *
  +     * @deprecated The digester instance is now set in the {@link Digester#addRule} method. 
  +     * Use {@link #ObjectCreateRule(String className, String attributeName)} instead.
        */
       public ObjectCreateRule(Digester digester, String className,
                               String attributeName) {
   
  -        super(digester);
  -        this.className = className;
  -        this.attributeName = attributeName;
  +        this (className, attributeName);
   
       }
   
  @@ -135,15 +142,73 @@
        * @param attributeName Attribute name which, if present, contains an
        * @param clazz Java class name of the object to be created
        *  override of the class name to create
  +     *
  +     * @deprecated The digester instance is now set in the {@link Digester#addRule} method. 
  +     * Use {@link #ObjectCreateRule(String attributeName, Class clazz)} instead.
        */
       public ObjectCreateRule(Digester digester,
                               String attributeName,
                               Class clazz) {
   
  -        this(digester, clazz.getName(), attributeName);
  +        this(attributeName, clazz);
  +
  +    }
  +
  +    /**
  +     * Construct an object create rule with the specified class name.
  +     *
  +     * @param className Java class name of the object to be created
  +     */
  +    public ObjectCreateRule(String className) {
  +
  +        this(className, (String) null);
  +
  +    }
  +
  +
  +    /**
  +     * Construct an object create rule with the specified class.
  +     *
  +     * @param clazz Java class name of the object to be created
  +     */
  +    public ObjectCreateRule(Class clazz) {
  +
  +        this(clazz.getName(), (String) null);
  +
  +    }
  +
  +
  +    /**
  +     * Construct an object create rule with the specified class name and an
  +     * optional attribute name containing an override.
  +     *
  +     * @param className Java class name of the object to be created
  +     * @param attributeName Attribute name which, if present, contains an
  +     *  override of the class name to create
  +     */
  +    public ObjectCreateRule(String className,
  +                            String attributeName) {
  +
  +        this.className = className;
  +        this.attributeName = attributeName;
   
       }
   
  +
  +    /**
  +     * Construct an object create rule with the specified class and an
  +     * optional attribute name containing an override.
  +     *
  +     * @param attributeName Attribute name which, if present, contains an
  +     * @param clazz Java class name of the object to be created
  +     *  override of the class name to create
  +     */
  +    public ObjectCreateRule(String attributeName,
  +                            Class clazz) {
  +
  +        this(clazz.getName(), attributeName);
  +
  +    }
   
       // ----------------------------------------------------- Instance Variables
   
  
  
  
  1.7       +5 -4      jakarta-commons/digester/src/java/org/apache/commons/digester/Rule.java
  
  Index: Rule.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/Rule.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- Rule.java	11 Mar 2002 20:18:44 -0000	1.6
  +++ Rule.java	23 Mar 2002 17:45:58 -0000	1.7
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/Rule.java,v 1.6 2002/03/11 20:18:44 rdonkin Exp $
  - * $Revision: 1.6 $
  - * $Date: 2002/03/11 20:18:44 $
  + * $Header: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/Rule.java,v 1.7 2002/03/23 17:45:58 rdonkin Exp $
  + * $Revision: 1.7 $
  + * $Date: 2002/03/23 17:45:58 $
    *
    * ====================================================================
    *
  @@ -71,7 +71,7 @@
    * a corresponding nested pattern of XML elements has been matched.
    *
    * @author Craig McClanahan
  - * @version $Revision: 1.6 $ $Date: 2002/03/11 20:18:44 $
  + * @version $Revision: 1.7 $ $Date: 2002/03/23 17:45:58 $
    */
   
   public abstract class Rule {
  @@ -84,6 +84,7 @@
        * Constructor sets the associated Digester.
        *
        * @param digester The digester with which this rule is associated
  +     * @deprecated The digester instance is now set in the {@link Digester#addRule} method. Use {@link #Rule()} instead.
        */
       public Rule(Digester digester) {
   
  
  
  
  1.13      +41 -6     jakarta-commons/digester/src/java/org/apache/commons/digester/SetNextRule.java
  
  Index: SetNextRule.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/SetNextRule.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- SetNextRule.java	20 Mar 2002 20:28:28 -0000	1.12
  +++ SetNextRule.java	23 Mar 2002 17:45:58 -0000	1.13
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/SetNextRule.java,v 1.12 2002/03/20 20:28:28 rdonkin Exp $
  - * $Revision: 1.12 $
  - * $Date: 2002/03/20 20:28:28 $
  + * $Header: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/SetNextRule.java,v 1.13 2002/03/23 17:45:58 rdonkin Exp $
  + * $Revision: 1.13 $
  + * $Date: 2002/03/23 17:45:58 $
    *
    * ====================================================================
    *
  @@ -82,7 +82,7 @@
    *
    * @author Craig McClanahan
    * @author Scott Sanders
  - * @version $Revision: 1.12 $ $Date: 2002/03/20 20:28:28 $
  + * @version $Revision: 1.13 $ $Date: 2002/03/23 17:45:58 $
    */
   
   public class SetNextRule extends Rule {
  @@ -98,10 +98,13 @@
        *
        * @param digester The associated Digester
        * @param methodName Method name of the parent method to call
  +     *
  +     * @deprecated The digester instance is now set in the {@link Digester#addRule} method. 
  +     * Use {@link #SetNextRule(String methodName)} instead.
        */
       public SetNextRule(Digester digester, String methodName) {
   
  -        this(digester, methodName, null);
  +        this(methodName);
   
       }
   
  @@ -115,11 +118,43 @@
        *  (if you wish to use a primitive type, specify the corresonding
        *  Java wrapper class instead, such as <code>java.lang.Boolean</code>
        *  for a <code>boolean</code> parameter)
  +     *
  +     * @deprecated The digester instance is now set in the {@link Digester#addRule} method. 
  +     * Use {@link #SetNextRule(String methodName,String paramType)} instead.
        */
       public SetNextRule(Digester digester, String methodName,
                          String paramType) {
   
  -        super(digester);
  +        this(methodName, paramType);
  +
  +    }
  +
  +    /**
  +     * Construct a "set next" rule with the specified method name.  The
  +     * method's argument type is assumed to be the class of the
  +     * child object.
  +     *
  +     * @param methodName Method name of the parent method to call
  +     */
  +    public SetNextRule(String methodName) {
  +
  +        this(methodName, null);
  +
  +    }
  +
  +
  +    /**
  +     * Construct a "set next" rule with the specified method name.
  +     *
  +     * @param methodName Method name of the parent method to call
  +     * @param paramType Java class of the parent method's argument
  +     *  (if you wish to use a primitive type, specify the corresonding
  +     *  Java wrapper class instead, such as <code>java.lang.Boolean</code>
  +     *  for a <code>boolean</code> parameter)
  +     */
  +    public SetNextRule(String methodName,
  +                       String paramType) {
  +
           this.methodName = methodName;
           this.paramType = paramType;
   
  
  
  
  1.8       +18 -5     jakarta-commons/digester/src/java/org/apache/commons/digester/SetPropertiesRule.java
  
  Index: SetPropertiesRule.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/SetPropertiesRule.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- SetPropertiesRule.java	23 Jan 2002 21:25:22 -0000	1.7
  +++ SetPropertiesRule.java	23 Mar 2002 17:45:58 -0000	1.8
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/SetPropertiesRule.java,v 1.7 2002/01/23 21:25:22 sanders Exp $
  - * $Revision: 1.7 $
  - * $Date: 2002/01/23 21:25:22 $
  + * $Header: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/SetPropertiesRule.java,v 1.8 2002/03/23 17:45:58 rdonkin Exp $
  + * $Revision: 1.8 $
  + * $Date: 2002/03/23 17:45:58 $
    *
    * ====================================================================
    *
  @@ -74,7 +74,7 @@
    * stack, based on attributes with corresponding names.
    *
    * @author Craig McClanahan
  - * @version $Revision: 1.7 $ $Date: 2002/01/23 21:25:22 $
  + * @version $Revision: 1.8 $ $Date: 2002/03/23 17:45:58 $
    */
   
   public class SetPropertiesRule extends Rule {
  @@ -87,10 +87,23 @@
        * Default constructor sets only the the associated Digester.
        *
        * @param digester The digester with which this rule is associated
  +     *
  +     * @deprecated The digester instance is now set in the {@link Digester#addRule} method. 
  +     * Use {@link #SetPropertiesRule()} instead.
        */
       public SetPropertiesRule(Digester digester) {
   
  -        super(digester);
  +        this();
  +
  +    }
  +    
  +
  +    /**
  +     * Base constructor.
  +     */
  +    public SetPropertiesRule() {
  +
  +        // nothing to set up 
   
       }
   
  
  
  
  1.8       +22 -6     jakarta-commons/digester/src/java/org/apache/commons/digester/SetPropertyRule.java
  
  Index: SetPropertyRule.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/SetPropertyRule.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- SetPropertyRule.java	23 Jan 2002 21:25:22 -0000	1.7
  +++ SetPropertyRule.java	23 Mar 2002 17:45:58 -0000	1.8
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/SetPropertyRule.java,v 1.7 2002/01/23 21:25:22 sanders Exp $
  - * $Revision: 1.7 $
  - * $Date: 2002/01/23 21:25:22 $
  + * $Header: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/SetPropertyRule.java,v 1.8 2002/03/23 17:45:58 rdonkin Exp $
  + * $Revision: 1.8 $
  + * $Date: 2002/03/23 17:45:58 $
    *
    * ====================================================================
    *
  @@ -74,7 +74,7 @@
    * top of the stack, based on attributes with specified names.
    *
    * @author Craig McClanahan
  - * @version $Revision: 1.7 $ $Date: 2002/01/23 21:25:22 $
  + * @version $Revision: 1.8 $ $Date: 2002/03/23 17:45:58 $
    */
   
   public class SetPropertyRule extends Rule {
  @@ -92,15 +92,31 @@
        *  property to be set
        * @param value Name of the attribute that will contain the value to which
        *  the property should be set
  +     *
  +     * @deprecated The digester instance is now set in the {@link Digester#addRule} method. 
  +     * Use {@link #SetPropertyRule(String name, String value)} instead.
        */
       public SetPropertyRule(Digester digester, String name, String value) {
   
  -        super(digester);
  +        this(name, value);
  +
  +    }
  +
  +    /**
  +     * Construct a "set property" rule with the specified name and value
  +     * attributes.
  +     *
  +     * @param name Name of the attribute that will contain the name of the
  +     *  property to be set
  +     * @param value Name of the attribute that will contain the value to which
  +     *  the property should be set
  +     */
  +    public SetPropertyRule(String name, String value) {
  +
           this.name = name;
           this.value = value;
   
       }
  -
   
       // ----------------------------------------------------- Instance Variables
   
  
  
  
  1.5       +41 -7     jakarta-commons/digester/src/java/org/apache/commons/digester/SetRootRule.java
  
  Index: SetRootRule.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/SetRootRule.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- SetRootRule.java	20 Mar 2002 20:28:28 -0000	1.4
  +++ SetRootRule.java	23 Mar 2002 17:45:58 -0000	1.5
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/SetRootRule.java,v 1.4 2002/03/20 20:28:28 rdonkin Exp $
  - * $Revision: 1.4 $
  - * $Date: 2002/03/20 20:28:28 $
  + * $Header: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/SetRootRule.java,v 1.5 2002/03/23 17:45:58 rdonkin Exp $
  + * $Revision: 1.5 $
  + * $Date: 2002/03/23 17:45:58 $
    *
    * ====================================================================
    *
  @@ -81,7 +81,7 @@
    * See {@link #isExactMatch()} for more details.</p>
    *
    * @author Scott Sanders
  - * @version $Revision: 1.4 $ $Date: 2002/03/20 20:28:28 $
  + * @version $Revision: 1.5 $ $Date: 2002/03/23 17:45:58 $
    */
   
   public class SetRootRule extends Rule {
  @@ -97,10 +97,13 @@
        *
        * @param digester The associated Digester
        * @param methodName Method name of the parent method to call
  +     *
  +     * @deprecated The digester instance is now set in the {@link Digester#addRule} method. 
  +     * Use {@link #SetRootRule(String methodName)} instead.
        */
       public SetRootRule(Digester digester, String methodName) {
   
  -        this(digester, methodName, null);
  +        this(methodName);
   
       }
   
  @@ -114,16 +117,47 @@
        *  (if you wish to use a primitive type, specify the corresonding
        *  Java wrapper class instead, such as <code>java.lang.Boolean</code>
        *  for a <code>boolean</code> parameter)
  +     *
  +     * @deprecated The digester instance is now set in the {@link Digester#addRule} method. 
  +     * Use {@link #SetRootRule(String methodName,String paramType)} instead.
        */
       public SetRootRule(Digester digester, String methodName,
                          String paramType) {
   
  -        super(digester);
  +        this(methodName, paramType);
  +
  +    }
  +
  +    /**
  +     * Construct a "set root" rule with the specified method name.  The
  +     * method's argument type is assumed to be the class of the
  +     * child object.
  +     *
  +     * @param methodName Method name of the parent method to call
  +     */
  +    public SetRootRule(String methodName) {
  +
  +        this(methodName, null);
  +
  +    }
  +
  +
  +    /**
  +     * Construct a "set root" rule with the specified method name.
  +     *
  +     * @param methodName Method name of the parent method to call
  +     * @param paramType Java class of the parent method's argument
  +     *  (if you wish to use a primitive type, specify the corresonding
  +     *  Java wrapper class instead, such as <code>java.lang.Boolean</code>
  +     *  for a <code>boolean</code> parameter)
  +     */
  +    public SetRootRule(String methodName,
  +                       String paramType) {
  +
           this.methodName = methodName;
           this.paramType = paramType;
   
       }
  -
   
       // ----------------------------------------------------- Instance Variables
   
  
  
  
  1.14      +41 -6     jakarta-commons/digester/src/java/org/apache/commons/digester/SetTopRule.java
  
  Index: SetTopRule.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/SetTopRule.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- SetTopRule.java	20 Mar 2002 20:28:28 -0000	1.13
  +++ SetTopRule.java	23 Mar 2002 17:45:58 -0000	1.14
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/SetTopRule.java,v 1.13 2002/03/20 20:28:28 rdonkin Exp $
  - * $Revision: 1.13 $
  - * $Date: 2002/03/20 20:28:28 $
  + * $Header: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/SetTopRule.java,v 1.14 2002/03/23 17:45:58 rdonkin Exp $
  + * $Revision: 1.14 $
  + * $Date: 2002/03/23 17:45:58 $
    *
    * ====================================================================
    *
  @@ -82,7 +82,7 @@
    * @author Craig McClanahan
    * @author Scott Sanders
    * @author Janek Bogucki
  - * @version $Revision: 1.13 $ $Date: 2002/03/20 20:28:28 $
  + * @version $Revision: 1.14 $ $Date: 2002/03/23 17:45:58 $
    */
   
   public class SetTopRule extends Rule {
  @@ -98,10 +98,13 @@
        *
        * @param digester The associated Digester
        * @param methodName Method name of the "set parent" method to call
  +     *
  +     * @deprecated The digester instance is now set in the {@link Digester#addRule} method. 
  +     * Use {@link #SetTopRule(String methodName)} instead.
        */
       public SetTopRule(Digester digester, String methodName) {
   
  -        this(digester, methodName, null);
  +        this(methodName);
   
       }
   
  @@ -115,11 +118,43 @@
        *  (if you wish to use a primitive type, specify the corresonding
        *  Java wrapper class instead, such as <code>java.lang.Boolean</code>
        *  for a <code>boolean</code> parameter)
  +     *
  +     * @deprecated The digester instance is now set in the {@link Digester#addRule} method. 
  +     * Use {@link #SetTopRule(String methodName, String paramType)} instead.
        */
       public SetTopRule(Digester digester, String methodName,
                         String paramType) {
   
  -        super(digester);
  +        this(methodName, paramType);
  +
  +    }
  +
  +    /**
  +     * Construct a "set parent" rule with the specified method name.  The
  +     * "set parent" method's argument type is assumed to be the class of the
  +     * parent object.
  +     *
  +     * @param methodName Method name of the "set parent" method to call
  +     */
  +    public SetTopRule(String methodName) {
  +
  +        this(methodName, null);
  +
  +    }
  +
  +
  +    /**
  +     * Construct a "set parent" rule with the specified method name.
  +     *
  +     * @param methodName Method name of the "set parent" method to call
  +     * @param paramType Java class of the "set parent" method's argument
  +     *  (if you wish to use a primitive type, specify the corresonding
  +     *  Java wrapper class instead, such as <code>java.lang.Boolean</code>
  +     *  for a <code>boolean</code> parameter)
  +     */
  +    public SetTopRule(String methodName,
  +                      String paramType) {
  +
           this.methodName = methodName;
           this.paramType = paramType;
   
  
  
  
  1.5       +10 -10    jakarta-commons/digester/src/test/org/apache/commons/digester/BeanPropertySetterRuleTestCase.java
  
  Index: BeanPropertySetterRuleTestCase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/digester/src/test/org/apache/commons/digester/BeanPropertySetterRuleTestCase.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- BeanPropertySetterRuleTestCase.java	23 Jan 2002 22:38:01 -0000	1.4
  +++ BeanPropertySetterRuleTestCase.java	23 Mar 2002 17:45:59 -0000	1.5
  @@ -157,17 +157,17 @@
           digester.setRules(new RulesBase());
   
           // add first test rule
  -        TestRule firstRule = new TestRule(digester, "first");
  +        TestRule firstRule = new TestRule("first");
           firstRule.setOrder(callOrder);
           digester.addRule("root/alpha", firstRule);
   
           // add second test rule
  -        TestRule secondRule = new TestRule(digester, "second");
  +        TestRule secondRule = new TestRule("second");
           secondRule.setOrder(callOrder);
           digester.addRule("root/alpha", secondRule);
   
           // add third test rule
  -        TestRule thirdRule = new TestRule(digester, "third");
  +        TestRule thirdRule = new TestRule("third");
           thirdRule.setOrder(callOrder);
           digester.addRule("root/alpha", thirdRule);
   
  @@ -248,19 +248,19 @@
           digester.setRules(new RulesBase());
   
           // add test rule to catch body text
  -        TestRule rootRule = new TestRule(digester, "root");
  +        TestRule rootRule = new TestRule("root");
           digester.addRule("root", rootRule);
   
           // add test rule to catch body text
  -        TestRule alphaRule = new TestRule(digester, "root/alpha");
  +        TestRule alphaRule = new TestRule("root/alpha");
           digester.addRule("root/alpha", alphaRule);
   
           // add test rule to catch body text
  -        TestRule betaRule = new TestRule(digester, "root/beta");
  +        TestRule betaRule = new TestRule("root/beta");
           digester.addRule("root/beta", betaRule);
   
           // add test rule to catch body text
  -        TestRule gammaRule = new TestRule(digester, "root/gamma");
  +        TestRule gammaRule = new TestRule("root/gamma");
           digester.addRule("root/gamma", gammaRule);
   
           try {
  @@ -305,10 +305,10 @@
           digester.addObjectCreate("root", "org.apache.commons.digester.SimpleTestBean");
   
           // we'll set property alpha with the body text of root
  -        digester.addRule("root", new BeanPropertySetterRule(digester, "alpha"));
  +        digester.addRule("root", new BeanPropertySetterRule("alpha"));
   
           // we'll set property beta with the body text of child element alpha
  -        digester.addRule("root/alpha", new BeanPropertySetterRule(digester, "beta"));
  +        digester.addRule("root/alpha", new BeanPropertySetterRule("beta"));
   
           // we'll leave property gamma alone
   
  @@ -352,7 +352,7 @@
           digester.addObjectCreate("root", "org.apache.commons.digester.SimpleTestBean");
   
           // match all children of root with this rule
  -        digester.addRule("root/?", new BeanPropertySetterRule(digester));
  +        digester.addRule("root/?", new BeanPropertySetterRule());
   
           SimpleTestBean bean = null;
           try {
  
  
  
  1.10      +7 -7      jakarta-commons/digester/src/test/org/apache/commons/digester/DigesterTestCase.java
  
  Index: DigesterTestCase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/digester/src/test/org/apache/commons/digester/DigesterTestCase.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- DigesterTestCase.java	23 Jan 2002 22:38:01 -0000	1.9
  +++ DigesterTestCase.java	23 Mar 2002 17:45:59 -0000	1.10
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-commons/digester/src/test/org/apache/commons/digester/DigesterTestCase.java,v 1.9 2002/01/23 22:38:01 sanders Exp $
  - * $Revision: 1.9 $
  - * $Date: 2002/01/23 22:38:01 $
  + * $Header: /home/cvs/jakarta-commons/digester/src/test/org/apache/commons/digester/DigesterTestCase.java,v 1.10 2002/03/23 17:45:59 rdonkin Exp $
  + * $Revision: 1.10 $
  + * $Date: 2002/03/23 17:45:59 $
    *
    * ====================================================================
    *
  @@ -80,7 +80,7 @@
    * </p>
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.9 $ $Date: 2002/01/23 22:38:01 $
  + * @version $Revision: 1.10 $ $Date: 2002/03/23 17:45:59 $
    */
   
   public class DigesterTestCase extends TestCase {
  @@ -275,9 +275,9 @@
                   0, digester.getRules().rules().size());
   
           // We're going to set up
  -        digester.addRule("a/b/c/d", new TestRule(digester, "a/b/c/d"));
  -        digester.addRule("*/d", new TestRule(digester, "*/d"));
  -        digester.addRule("*/c/d", new TestRule(digester, "*/c/d"));
  +        digester.addRule("a/b/c/d", new TestRule("a/b/c/d"));
  +        digester.addRule("*/d", new TestRule("*/d"));
  +        digester.addRule("*/c/d", new TestRule("*/c/d"));
   
           // Test exact match
           assertEquals("Exact match takes precedence 1",
  
  
  
  1.4       +21 -21    jakarta-commons/digester/src/test/org/apache/commons/digester/EBRTestCase.java
  
  Index: EBRTestCase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/digester/src/test/org/apache/commons/digester/EBRTestCase.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- EBRTestCase.java	23 Jan 2002 22:38:01 -0000	1.3
  +++ EBRTestCase.java	23 Mar 2002 17:45:59 -0000	1.4
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-commons/digester/src/test/org/apache/commons/digester/EBRTestCase.java,v 1.3 2002/01/23 22:38:01 sanders Exp $
  - * $Revision: 1.3 $
  - * $Date: 2002/01/23 22:38:01 $
  + * $Header: /home/cvs/jakarta-commons/digester/src/test/org/apache/commons/digester/EBRTestCase.java,v 1.4 2002/03/23 17:45:59 rdonkin Exp $
  + * $Revision: 1.4 $
  + * $Date: 2002/03/23 17:45:59 $
    *
    * ====================================================================
    *
  @@ -74,7 +74,7 @@
    * <p> Runs standard tests for RulesBase as well as tests of extensions.
    *
    * @author Robert Burrell Donkin <robertdonkin@mac.com>
  - * @version $Revision: 1.3 $ $Date: 2002/01/23 22:38:01 $
  + * @version $Revision: 1.4 $ $Date: 2002/03/23 17:45:59 $
    */
   
   
  @@ -134,10 +134,10 @@
           // Set up rules
           // since these are all NON-UNIVERSAL matches
           // only expect one match at each stage
  -        digester.addRule("alpha/beta/gamma/delta", new TestRule(digester, "exact"));
  -        digester.addRule("*/beta/gamma/epsilon", new TestRule(digester, "wild_child"));
  -        digester.addRule("alpha/beta/gamma/?", new TestRule(digester, "exact_parent"));
  -        digester.addRule("*/beta/gamma/?", new TestRule(digester, "wild_parent"));
  +        digester.addRule("alpha/beta/gamma/delta", new TestRule("exact"));
  +        digester.addRule("*/beta/gamma/epsilon", new TestRule("wild_child"));
  +        digester.addRule("alpha/beta/gamma/?", new TestRule("exact_parent"));
  +        digester.addRule("*/beta/gamma/?", new TestRule("wild_parent"));
   
   
           List list = null;
  @@ -203,15 +203,15 @@
   
           // Set up rules
           // set up universal matches against non-universal ones
  -        digester.addRule("alpha/beta/gamma", new TestRule(digester, "exact"));
  -        digester.addRule("*/beta/gamma", new TestRule(digester, "non_wild_head"));
  -        digester.addRule("!*/beta/gamma", new TestRule(digester, "universal_wild_head"));
  -        digester.addRule("!alpha/beta/gamma/?", new TestRule(digester, "universal_wild_child"));
  -        digester.addRule("alpha/beta/gamma/?", new TestRule(digester, "non_wild_child"));
  -        digester.addRule("alpha/beta/gamma/epsilon", new TestRule(digester, "exact2"));
  -        digester.addRule("alpha/epsilon/beta/gamma/zeta", new TestRule(digester, "exact3"));
  -        digester.addRule("*/gamma/?", new TestRule(digester, "non_wildhead_child"));
  -        digester.addRule("!*/epsilon/beta/gamma/?", new TestRule(digester, "universal_wildhead_child"));
  +        digester.addRule("alpha/beta/gamma", new TestRule("exact"));
  +        digester.addRule("*/beta/gamma", new TestRule("non_wild_head"));
  +        digester.addRule("!*/beta/gamma", new TestRule("universal_wild_head"));
  +        digester.addRule("!alpha/beta/gamma/?", new TestRule("universal_wild_child"));
  +        digester.addRule("alpha/beta/gamma/?", new TestRule("non_wild_child"));
  +        digester.addRule("alpha/beta/gamma/epsilon", new TestRule("exact2"));
  +        digester.addRule("alpha/epsilon/beta/gamma/zeta", new TestRule("exact3"));
  +        digester.addRule("*/gamma/?", new TestRule("non_wildhead_child"));
  +        digester.addRule("!*/epsilon/beta/gamma/?", new TestRule("universal_wildhead_child"));
   
   
           List list = null;
  @@ -287,10 +287,10 @@
   
           // Set up rules
           // The combinations a little large to test everything but we'll pick a couple and try them.
  -        digester.addRule("*", new TestRule(digester, "basic_wild"));
  -        digester.addRule("!*", new TestRule(digester, "universal_wild"));
  -        digester.addRule("alpha/beta/gamma/delta", new TestRule(digester, "exact"));
  -        digester.addRule("*/beta/gamma/?", new TestRule(digester, "wild_parent"));
  +        digester.addRule("*", new TestRule("basic_wild"));
  +        digester.addRule("!*", new TestRule("universal_wild"));
  +        digester.addRule("alpha/beta/gamma/delta", new TestRule("exact"));
  +        digester.addRule("*/beta/gamma/?", new TestRule("wild_parent"));
   
   
           List list = null;
  
  
  
  1.5       +12 -12    jakarta-commons/digester/src/test/org/apache/commons/digester/RulesBaseTestCase.java
  
  Index: RulesBaseTestCase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/digester/src/test/org/apache/commons/digester/RulesBaseTestCase.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- RulesBaseTestCase.java	23 Jan 2002 22:38:01 -0000	1.4
  +++ RulesBaseTestCase.java	23 Mar 2002 17:45:59 -0000	1.5
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-commons/digester/src/test/org/apache/commons/digester/RulesBaseTestCase.java,v 1.4 2002/01/23 22:38:01 sanders Exp $
  - * $Revision: 1.4 $
  - * $Date: 2002/01/23 22:38:01 $
  + * $Header: /home/cvs/jakarta-commons/digester/src/test/org/apache/commons/digester/RulesBaseTestCase.java,v 1.5 2002/03/23 17:45:59 rdonkin Exp $
  + * $Revision: 1.5 $
  + * $Date: 2002/03/23 17:45:59 $
    *
    * ====================================================================
    *
  @@ -79,7 +79,7 @@
    * </p>
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.4 $ $Date: 2002/01/23 22:38:01 $
  + * @version $Revision: 1.5 $ $Date: 2002/03/23 17:45:59 $
    */
   
   public class RulesBaseTestCase extends TestCase {
  @@ -203,9 +203,9 @@
                   0, digester.getRules().rules().size());
   
           // We're going to set up
  -        digester.addRule("a/b/c/d", new TestRule(digester, "a/b/c/d"));
  -        digester.addRule("*/d", new TestRule(digester, "*/d"));
  -        digester.addRule("*/c/d", new TestRule(digester, "*/c/d"));
  +        digester.addRule("a/b/c/d", new TestRule("a/b/c/d"));
  +        digester.addRule("*/d", new TestRule("*/d"));
  +        digester.addRule("*/c/d", new TestRule("*/c/d"));
   
           // Test exact match
           assertEquals("Exact match takes precedence 1",
  @@ -248,8 +248,8 @@
                   0, digester.getRules().rules().size());
   
           // Set up rules
  -        digester.addRule("alpha/beta/gamma", new TestRule(digester, "No-Namespace"));
  -        digester.addRule("alpha/beta/gamma", new TestRule(digester, "Euclidean-Namespace", "euclidean"));
  +        digester.addRule("alpha/beta/gamma", new TestRule("No-Namespace"));
  +        digester.addRule("alpha/beta/gamma", new TestRule("Euclidean-Namespace", "euclidean"));
   
   
           list = digester.getRules().rules();
  @@ -301,9 +301,9 @@
                   0, digester.getRules().rules().size());
   
           // Set up rules
  -        digester.addRule("alpha/beta/gamma", new TestRule(digester, "one"));
  -        digester.addRule("alpha/beta/gamma", new TestRule(digester, "two"));
  -        digester.addRule("alpha/beta/gamma", new TestRule(digester, "three"));
  +        digester.addRule("alpha/beta/gamma", new TestRule("one"));
  +        digester.addRule("alpha/beta/gamma", new TestRule("two"));
  +        digester.addRule("alpha/beta/gamma", new TestRule("three"));
   
           // test that rules are returned in set order
           List list = digester.getRules().match(null, "alpha/beta/gamma");
  
  
  
  1.8       +2 -16     jakarta-commons/digester/src/test/org/apache/commons/digester/TestRule.java
  
  Index: TestRule.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/digester/src/test/org/apache/commons/digester/TestRule.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- TestRule.java	11 Mar 2002 20:18:45 -0000	1.7
  +++ TestRule.java	23 Mar 2002 17:45:59 -0000	1.8
  @@ -70,7 +70,7 @@
    * at the identifier.</p>
    *
    * @author Robert Burrell Donkin
  - * @revision $Revision: 1.7 $ $Date: 2002/03/11 20:18:45 $
  + * @revision $Revision: 1.8 $ $Date: 2002/03/23 17:45:59 $
    */
   
   public class TestRule extends Rule {
  @@ -100,30 +100,16 @@
       }
   
       /**
  -     * Old fashioned constructor.
  -     *
  -     * @param digester The digester with which this rule is associated
  -     * @param identifier Used to tell which TestRule is which
  -     */
  -    public TestRule(Digester digester, String identifier) {
  -
  -        super(digester);
  -        this.identifier = identifier;
  -    }
  -
  -
  -    /**
        * Constructor sets namespace URI.
        *
        * @param digester The digester with which this rule is associated
        * @param identifier Used to tell which TestRule is which
        * @param namespaceURI Set rule namespace
        */
  -    public TestRule(Digester digester,
  +    public TestRule(
                       String identifier,
                       String namespaceURI) {
   
  -        super(digester);
           this.identifier = identifier;
           setNamespaceURI(namespaceURI);
   
  
  
  

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message