Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
CallMethodOnIndexRule |
|
| 1.0;1 |
1 | /* | |
2 | * $Id: CallMethodOnIndexRule.java 7976 2007-08-21 14:26:13Z dirk.olmes $ | |
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 CPAL v1.0 | |
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: 7976 $ | |
20 | */ | |
21 | public class CallMethodOnIndexRule extends CallMethodRule | |
22 | { | |
23 | 0 | int index = 0; |
24 | ||
25 | public CallMethodOnIndexRule(String s, int i, int index) | |
26 | { | |
27 | 0 | super(s, i); |
28 | 0 | this.index = index; |
29 | 0 | } |
30 | ||
31 | public CallMethodOnIndexRule(String s, int index) | |
32 | { | |
33 | 0 | super(s); |
34 | 0 | this.index = index; |
35 | 0 | } |
36 | ||
37 | public void end(String string, String string1) throws Exception | |
38 | { | |
39 | 0 | Object o = digester.peek(index); |
40 | 0 | digester.push(o); |
41 | 0 | super.end(string, string1); |
42 | 0 | o = digester.pop(); |
43 | 0 | } |
44 | ||
45 | } |