01: //========================================================================
02: //Copyright 2006 Mort Bay Consulting Pty. Ltd.
03: //------------------------------------------------------------------------
04: //Licensed under the Apache License, Version 2.0 (the "License");
05: //you may not use this file except in compliance with the License.
06: //You may obtain a copy of the License at
07: //http://www.apache.org/licenses/LICENSE-2.0
08: //Unless required by applicable law or agreed to in writing, software
09: //distributed under the License is distributed on an "AS IS" BASIS,
10: //WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11: //See the License for the specific language governing permissions and
12: //limitations under the License.
13: //========================================================================
14:
15: package org.mortbay.xml;
16:
17: import java.net.URL;
18: import java.util.HashMap;
19:
20: public class TestConfiguration extends HashMap {
21: public static int VALUE = 77;
22:
23: public TestConfiguration nested;
24: public Object testObject;
25: public int testInt;
26: public URL url;
27: public static boolean called = false;
28: public Object[] oa;
29: public int[] ia;
30: public int testField1;
31: public int testField2;
32:
33: public void setTest(Object value) {
34: testObject = value;
35: }
36:
37: public void setTest(int value) {
38: testInt = value;
39: }
40:
41: public void call() {
42: put("Called", "Yes");
43: }
44:
45: public TestConfiguration call(Boolean b) {
46: nested = new TestConfiguration();
47: nested.put("Arg", b);
48: return nested;
49: }
50:
51: public void call(URL u, boolean b) {
52: put("URL", b ? "1" : "0");
53: url = u;
54: }
55:
56: public String getString() {
57: return "String";
58: }
59:
60: public static void callStatic() {
61: called = true;
62: }
63:
64: public void call(Object[] oa) {
65: this .oa = oa;
66: }
67:
68: public void call(int[] ia) {
69: this.ia = ia;
70: }
71: }
|