01850dac6d672affd00727a77f5b6629ab1de404
[jalviewjs.git] / site / j2s / jssun / misc / Ref.js
1 Clazz.declarePackage ("jssun.misc");\r
2 c$ = Clazz.decorateAsClass (function () {\r
3 this.soft = null;\r
4 Clazz.instantialize (this, arguments);\r
5 }, jssun.misc, "Ref");\r
6 Clazz.defineMethod (c$, "get", \r
7 function () {\r
8 var t = this.check ();\r
9 if (t == null) {\r
10 t = this.reconstitute ();\r
11 this.setThing (t);\r
12 }return t;\r
13 });\r
14 Clazz.defineMethod (c$, "flush", \r
15 function () {\r
16 });\r
17 Clazz.defineMethod (c$, "setThing", \r
18 function (thing) {\r
19 this.flush ();\r
20 this.soft = thing;\r
21 }, "~O");\r
22 Clazz.defineMethod (c$, "check", \r
23 function () {\r
24 return this.soft;\r
25 });\r
26 Clazz.makeConstructor (c$, \r
27 function () {\r
28 });\r
29 Clazz.makeConstructor (c$, \r
30 function (thing) {\r
31 this.setThing (thing);\r
32 }, "~O");\r