01: /* JFox, the OpenSource J2EE Application Server
02: *
03: * Copyright (C) 2002 huihoo.com
04: * Distributable under GNU LGPL license
05: * See the GNU Lesser General Public License for more details.
06: */
07:
08: package org.huihoo.jfox.jmx.loading;
09:
10: /**
11: * express a Mlet Tag Object which contains arguments and attributes
12: *
13: * @author <a href="mailto:young_yy@hotmail.com">Young Yang</a>
14: */
15:
16: public class MLetObject {
17:
18: private MLetAttribute[] attrs;
19: private MLetArgument[] args;
20:
21: public MLetObject(MLetAttribute[] attrs, MLetArgument[] args) {
22: this .attrs = attrs;
23: this .args = args;
24: }
25:
26: public String getAttribute(String name) {
27: for (int i = 0; i < attrs.length; i++) {
28: if (attrs[i].getName().equalsIgnoreCase(name)) {
29: return attrs[i].getValue();
30: }
31: }
32: return null;
33: }
34:
35: public MLetAttribute[] getAttributes() {
36: return attrs;
37: }
38:
39: public MLetArgument[] getArguments() {
40: return args;
41: }
42: }
|