Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@www.apache.org Received: (qmail 60784 invoked from network); 12 Feb 2005 11:12:25 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 12 Feb 2005 11:12:25 -0000 Received: (qmail 2473 invoked by uid 500); 12 Feb 2005 11:12:24 -0000 Delivered-To: apmail-jakarta-commons-dev-archive@jakarta.apache.org Received: (qmail 1951 invoked by uid 500); 12 Feb 2005 11:12:22 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 1938 invoked by uid 500); 12 Feb 2005 11:12:22 -0000 Received: (qmail 1935 invoked by uid 99); 12 Feb 2005 11:12:22 -0000 X-ASF-Spam-Status: No, hits=-9.8 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from minotaur.apache.org (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.28) with SMTP; Sat, 12 Feb 2005 03:12:22 -0800 Received: (qmail 60750 invoked by uid 65534); 12 Feb 2005 11:12:20 -0000 Message-ID: <20050212111220.60749.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Mailer: svnmailer-1.0.0-dev Date: Sat, 12 Feb 2005 11:12:20 -0000 Subject: svn commit: r153494 - jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/actions/CallParamFromStackAction.java To: commons-cvs@jakarta.apache.org From: skitching@apache.org X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Author: skitching Date: Sat Feb 12 03:12:17 2005 New Revision: 153494 URL: http://svn.apache.org/viewcvs?view=3Drev&rev=3D153494 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/a= pache/commons/digester2/actions/CallParamFromStackAction.java URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/digester/branches= /digester2/src/java/org/apache/commons/digester2/actions/CallParamFromStack= Action.java?view=3Ddiff&r1=3D153493&r2=3D153494 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- 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. + *

+ * 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. */ =20 public class CallParamFromStackAction extends AbstractAction { @@ -49,10 +53,25 @@ // --------------------------------------------------------- =20 /** - * 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. + *

+ * 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 =3D paramIndex; --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org