JAL-1807 Bob's JalviewJS prototype first commit
[jalviewjs.git] / site / swingjs / j2s / swingjs / api / Interface.js
1 Clazz.declarePackage ("swingjs.api");\r
2 c$ = Clazz.declareType (swingjs.api, "Interface");\r
3 c$.getInstance = Clazz.defineMethod (c$, "getInstance", \r
4 function (name, isQuiet) {\r
5 try {\r
6 {\r
7 Clazz._isQuiet = isQuiet;\r
8 }System.out.println ("swingjs.api.Interface creating instance of " + name);\r
9 var x = Clazz._4Name (name);\r
10 {\r
11 Clazz._isQuiet = false;\r
12 }return (x == null ? null : x.newInstance ());\r
13 } catch (e) {\r
14 if (Clazz.exceptionOf (e, Exception)) {\r
15 System.out.println ("Interface.java Error creating instance for " + name + ": \n" + e);\r
16 return null;\r
17 } else {\r
18 throw e;\r
19 }\r
20 }\r
21 }, "~S,~B");\r