1 Clazz.declarePackage ("org.xml.sax.helpers");
\r
2 Clazz.load (["org.xml.sax.AttributeList", "java.util.Vector"], "org.xml.sax.helpers.AttributeListImpl", null, function () {
\r
3 c$ = Clazz.decorateAsClass (function () {
\r
7 Clazz.instantialize (this, arguments);
\r
8 }, org.xml.sax.helpers, "AttributeListImpl", null, org.xml.sax.AttributeList);
\r
9 Clazz.prepareFields (c$, function () {
\r
10 this.names = new java.util.Vector ();
\r
11 this.types = new java.util.Vector ();
\r
12 this.values = new java.util.Vector ();
\r
14 Clazz.makeConstructor (c$,
\r
17 Clazz.makeConstructor (c$,
\r
19 this.setAttributeList (atts);
\r
20 }, "org.xml.sax.AttributeList");
\r
21 Clazz.defineMethod (c$, "setAttributeList",
\r
23 var count = atts.getLength ();
\r
25 for (var i = 0; i < count; i++) {
\r
26 this.addAttribute (atts.getName (i), atts.getType (i), atts.getValue (i));
\r
28 }, "org.xml.sax.AttributeList");
\r
29 Clazz.defineMethod (c$, "addAttribute",
\r
30 function (name, type, value) {
\r
31 this.names.addElement (name);
\r
32 this.types.addElement (type);
\r
33 this.values.addElement (value);
\r
35 Clazz.defineMethod (c$, "removeAttribute",
\r
37 var i = this.names.indexOf (name);
\r
39 this.names.removeElementAt (i);
\r
40 this.types.removeElementAt (i);
\r
41 this.values.removeElementAt (i);
\r
43 Clazz.defineMethod (c$, "clear",
\r
45 this.names.removeAllElements ();
\r
46 this.types.removeAllElements ();
\r
47 this.values.removeAllElements ();
\r
49 Clazz.defineMethod (c$, "getLength",
\r
51 return this.names.size ();
\r
53 Clazz.defineMethod (c$, "getName",
\r
58 return this.names.elementAt (i);
\r
60 if (Clazz.exceptionOf (e, ArrayIndexOutOfBoundsException)) {
\r
67 Clazz.defineMethod (c$, "getType",
\r
72 return this.types.elementAt (i);
\r
74 if (Clazz.exceptionOf (e, ArrayIndexOutOfBoundsException)) {
\r
81 Clazz.defineMethod (c$, "getValue",
\r
86 return this.values.elementAt (i);
\r
88 if (Clazz.exceptionOf (e, ArrayIndexOutOfBoundsException)) {
\r
95 Clazz.defineMethod (c$, "getType",
\r
97 return this.getType (this.names.indexOf (name));
\r
99 Clazz.defineMethod (c$, "getValue",
\r
101 return this.getValue (this.names.indexOf (name));
\r