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