1 Clazz.declarePackage ("java.text");
\r
2 Clazz.load (["java.text.AttributedCharacterIterator"], "java.text.Format", ["java.lang.StringBuffer", "java.text.AttributedString", "$.FieldPosition", "$.ParseException", "$.ParsePosition"], function () {
\r
3 c$ = Clazz.declareType (java.text, "Format", null, [java.io.Serializable, Cloneable]);
\r
4 Clazz.makeConstructor (c$,
\r
7 Clazz.defineMethod (c$, "format",
\r
9 return this.format (obj, new StringBuffer (), new java.text.FieldPosition (0)).toString ();
\r
11 Clazz.defineMethod (c$, "formatToCharacterIterator",
\r
13 return this.createAttributedCharacterIterator (this.format (obj));
\r
15 Clazz.defineMethod (c$, "parseObject",
\r
17 var pos = new java.text.ParsePosition (0);
\r
18 var result = this.parseObject (source, pos);
\r
19 if (pos.index == 0) {
\r
20 throw new java.text.ParseException ("Format.parseObject(String) failed", pos.errorIndex);
\r
23 Clazz.defineMethod (c$, "clone",
\r
26 return Clazz.superCall (this, java.text.Format, "clone", []);
\r
28 if (Clazz.exceptionOf (e, CloneNotSupportedException)) {
\r
35 Clazz.defineMethod (c$, "createAttributedCharacterIterator",
\r
37 var as = new java.text.AttributedString (s);
\r
38 return as.getIterator ();
\r
40 Clazz.defineMethod (c$, "createAttributedCharacterIterator",
\r
41 function (iterators) {
\r
42 var as = new java.text.AttributedString (iterators);
\r
43 return as.getIterator ();
\r
45 Clazz.defineMethod (c$, "createAttributedCharacterIterator",
\r
46 function (string, key, value) {
\r
47 var as = new java.text.AttributedString (string);
\r
48 as.addAttribute (key, value);
\r
49 return as.getIterator ();
\r
50 }, "~S,java.text.AttributedCharacterIterator.Attribute,~O");
\r
51 Clazz.defineMethod (c$, "createAttributedCharacterIterator",
\r
52 function (iterator, key, value) {
\r
53 var as = new java.text.AttributedString (iterator);
\r
54 as.addAttribute (key, value);
\r
55 return as.getIterator ();
\r
56 }, "java.text.AttributedCharacterIterator,java.text.AttributedCharacterIterator.Attribute,~O");
\r
57 Clazz.pu$h(self.c$);
\r
58 c$ = Clazz.declareType (java.text.Format, "Field", java.text.AttributedCharacterIterator.Attribute);
\r
60 Clazz.declareInterface (java.text.Format, "FieldDelegate");
\r