commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From skitch...@apache.org
Subject svn commit: r153494 - jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/actions/CallParamFromStackAction.java
Date Sat, 12 Feb 2005 11:12:20 GMT
Author: skitching
Date: Sat Feb 12 03:12:17 2005
New Revision: 153494

URL: http://svn.apache.org/viewcvs?view=rev&rev=153494
Log:
Added constructor which passes the top object on stack by default.
Also improved javadoc

Modified:
    jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/actions/CallParamFromStackAction.java

Modified: jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/actions/CallParamFromStackAction.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/actions/CallParamFromStackAction.java?view=diff&r1=153493&r2=153494
==============================================================================
--- jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/actions/CallParamFromStackAction.java
(original)
+++ jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/actions/CallParamFromStackAction.java
Sat Feb 12 03:12:17 2005
@@ -30,6 +30,10 @@
 /**
  * Action which fetches an object from the digester object stack to use
  * as a parameter for the target method invoked by a CallMethodRule.
+ * <p>
+ * Note that the object to be passed is selected from the stack
+ * at the time this action executes, not at the time that the
+ * associated CallMethodRule executes.
  */
 
 public class CallParamFromStackAction extends AbstractAction {
@@ -49,10 +53,25 @@
     // ---------------------------------------------------------
 
     /**
-     * Construct a "call parameter" rule that will pass the body text
-     * of the matching xml element as the parameter value.
+     * Construct a "call parameter" rule that will pass the top object
+     * from the digester object stack as the parameter value.
+     */
+    public CallParamFromStackAction(int paramIndex) {
+        this(paramIndex, 0);
+    }
+
+    /**
+     * Construct a "call parameter" rule that will pass an object from
+     * the digester object stack as the parameter value.
+     * <p>
+     * A stack offset of 0 means the top (newest) object. Positive
+     * values count downward from the top of the stack. A stack offset
+     * of -1 means the root (oldest) object. Negative values count upward
+     * from the root of the stack.
      *
-     * @param paramIndex The zero-relative parameter number
+     * @param paramIndex The zero-relative parameter number.
+     * @param stackOffset is the location on the stack of the object to
+     * be passed.
      */
     public CallParamFromStackAction(int paramIndex, int stackOffset) {
         this.paramIndex = paramIndex;



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


Mime
View raw message