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