You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by rd...@apache.org on 2003/08/14 00:05:31 UTC

cvs commit: jakarta-commons/digester/src/java/org/apache/commons/digester Digester.java

rdonkin     2003/08/13 15:05:31

  Modified:    digester/src/java/org/apache/commons/digester Digester.java
  Log:
  Corrections to javadocs plus a new factory for the ObjectParamRule. Patch submitted by Simon Kitching.
  
  Revision  Changes    Path
  1.81      +35 -10    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.80
  retrieving revision 1.81
  diff -u -r1.80 -r1.81
  --- Digester.java	2 Aug 2003 09:54:06 -0000	1.80
  +++ Digester.java	13 Aug 2003 22:05:31 -0000	1.81
  @@ -858,7 +858,7 @@
        * using Context ClassLoader, then the class-loading defaults to
        * using the calling-class' ClassLoader.
        *
  -     * @param boolean determines whether to use Context ClassLoader.
  +     * @param use determines whether to use Context ClassLoader.
        */
       public void setUseContextClassLoader(boolean use) {
   
  @@ -985,7 +985,7 @@
       /**
        * Process notification of the end of an XML element being reached.
        *
  -     * @param uri - The Namespace URI, or the empty string if the
  +     * @param namespaceURI - The Namespace URI, or the empty string if the
        *   element has no Namespace URI or if Namespace processing is not
        *   being performed.
        * @param localName - The local name (without prefix), or the empty
  @@ -1112,7 +1112,7 @@
        *
        * @param buffer The characters from the XML document
        * @param start Starting offset into the buffer
  -     * @param length Number of characters from the buffer
  +     * @param len Number of characters from the buffer
        *
        * @exception SAXException if a parsing error is to be reported
        */
  @@ -1215,7 +1215,7 @@
       /**
        * Process notification of the start of an XML element being reached.
        *
  -     * @param uri The Namespace URI, or the empty string if the element
  +     * @param namespaceURI The Namespace URI, or the empty string if the element
        *   has no Namespace URI or if Namespace processing is not being performed.
        * @param localName The local name (without prefix), or the empty
        *   string if Namespace processing is not being performed.
  @@ -1841,7 +1841,6 @@
        * This takes a parameter from the given position on the stack.
        *
        * @param paramIndex The zero-relative parameter number
  -     * @param fromStack Should the call parameter be taken from the top of the stack?
        * @param stackIndex set the call parameter to the stackIndex'th object down the stack,
        * where 0 is the top of the stack, 1 the next element down and so on
        * @see CallMethodRule
  @@ -1867,6 +1866,32 @@
       }
       
       /**
  +     * Add a "call parameter" rule that sets a parameter from a 
  +     * caller-provided object. This can be used to pass constants such as
  +     * strings to methods; it can also be used to pass mutable objects,
  +     * providing ways for objects to do things like "register" themselves
  +     * with some shared object.
  +     * <p>
  +     * Note that when attempting to locate a matching method to invoke,
  +     * the true type of the paramObj is used, so that despite the paramObj
  +     * being passed in here as type Object, the target method can declare
  +     * its parameters as being the true type of the object (or some ancestor
  +     * type, according to the usual type-conversion rules).
  +     *
  +     * @param paramIndex The zero-relative parameter number
  +     * @param paramObj Any arbitrary object to be passed to the target
  +     * method.
  +     * @see CallMethodRule
  +     */    
  +    public void addObjectParam(String pattern, int paramIndex, 
  +                               Object paramObj) {
  +    
  +        addRule(pattern,
  +                new ObjectParamRule(paramIndex, paramObj));
  +      
  +    }
  +    
  +    /**
        * Add a "factory create" rule for the specified parameters.
        * Exceptions thrown during the object creation process will be propagated.
        *
  @@ -2210,7 +2235,7 @@
        *
        * @param pattern Element matching pattern
        * @param attributeName map this attribute
  -     * @param propertyNames to this property
  +     * @param propertyName to this property
        * @see SetPropertiesRule
        */
       public void addSetProperties(
  
  
  

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