KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > mule > config > builders > CallMethodOnIndexRule


1 /*
2  * $Id: CallMethodOnIndexRule.java 3798 2006-11-04 04:07:14Z aperepel $
3  * --------------------------------------------------------------------------------------
4  * Copyright (c) MuleSource, Inc. All rights reserved. http://www.mulesource.com
5  *
6  * The software in this package is published under the terms of the MuleSource MPL
7  * license, a copy of which has been included with this distribution in the
8  * LICENSE.txt file.
9  */

10
11 package org.mule.config.builders;
12
13 import org.apache.commons.digester.CallMethodRule;
14
15 /**
16  * todo document
17  *
18  * @author <a HREF="mailto:ross.mason@symphonysoft.com">Ross Mason</a>
19  * @version $Revision: 3798 $
20  */

21 public class CallMethodOnIndexRule extends CallMethodRule
22 {
23     int index = 0;
24
25     public CallMethodOnIndexRule(String JavaDoc s, int i, int index)
26     {
27         super(s, i);
28         this.index = index;
29     }
30
31     public CallMethodOnIndexRule(String JavaDoc s, int index)
32     {
33         super(s);
34         this.index = index;
35     }
36
37     public void end(String JavaDoc string, String JavaDoc string1) throws Exception JavaDoc
38     {
39         Object JavaDoc o = digester.peek(index);
40         digester.push(o);
41         super.end(string, string1);
42         o = digester.pop();
43     }
44
45 }
46
Popular Tags