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