9063f2b9619acb228de4d5196c30bd6b139cad9d
[jalviewjs.git] / site / swingjs / j2s / org / xml / sax / SAXException.js
1 Clazz.declarePackage ("org.xml.sax");\r
2 Clazz.load (["java.lang.Exception"], "org.xml.sax.SAXException", null, function () {\r
3 c$ = Clazz.decorateAsClass (function () {\r
4 this.exception = null;\r
5 Clazz.instantialize (this, arguments);\r
6 }, org.xml.sax, "SAXException", Exception);\r
7 Clazz.makeConstructor (c$, \r
8 function () {\r
9 Clazz.superConstructor (this, org.xml.sax.SAXException);\r
10 this.exception = null;\r
11 });\r
12 Clazz.makeConstructor (c$, \r
13 function (message) {\r
14 Clazz.superConstructor (this, org.xml.sax.SAXException, [message]);\r
15 this.exception = null;\r
16 }, "~S");\r
17 Clazz.makeConstructor (c$, \r
18 function (e) {\r
19 Clazz.superConstructor (this, org.xml.sax.SAXException);\r
20 this.exception = e;\r
21 }, "Exception");\r
22 Clazz.makeConstructor (c$, \r
23 function (message, e) {\r
24 Clazz.superConstructor (this, org.xml.sax.SAXException, [message]);\r
25 this.exception = e;\r
26 }, "~S,Exception");\r
27 Clazz.defineMethod (c$, "getMessage", \r
28 function () {\r
29 var message = Clazz.superCall (this, org.xml.sax.SAXException, "getMessage", []);\r
30 if (message == null && this.exception != null) {\r
31 return this.exception.getMessage ();\r
32 } else {\r
33 return message;\r
34 }});\r
35 Clazz.defineMethod (c$, "getException", \r
36 function () {\r
37 return this.exception;\r
38 });\r
39 Clazz.defineMethod (c$, "toString", \r
40 function () {\r
41 if (this.exception != null) {\r
42 return this.exception.toString ();\r
43 } else {\r
44 return Clazz.superCall (this, org.xml.sax.SAXException, "toString", []);\r
45 }});\r
46 });\r