JAL-1807 Bob's JalviewJS prototype first commit
[jalviewjs.git] / site / j2s / jssun / security / action / GetPropertyAction.js
1 Clazz.declarePackage ("jssun.security.action");\r
2 Clazz.load (["java.security.PrivilegedAction"], "jssun.security.action.GetPropertyAction", null, function () {\r
3 c$ = Clazz.decorateAsClass (function () {\r
4 this.theProp = null;\r
5 this.defaultVal = null;\r
6 Clazz.instantialize (this, arguments);\r
7 }, jssun.security.action, "GetPropertyAction", null, java.security.PrivilegedAction);\r
8 Clazz.makeConstructor (c$, \r
9 function (theProp) {\r
10 this.theProp = theProp;\r
11 }, "~S");\r
12 Clazz.makeConstructor (c$, \r
13 function (theProp, defaultVal) {\r
14 this.theProp = theProp;\r
15 this.defaultVal = defaultVal;\r
16 }, "~S,~S");\r
17 Clazz.overrideMethod (c$, "run", \r
18 function () {\r
19 var value = System.getProperty (this.theProp);\r
20 return (value == null ? this.defaultVal : value);\r
21 });\r
22 });\r