X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=site%2Fj2s%2Fjssun%2Fsecurity%2Faction%2FGetPropertyAction.js;fp=site%2Fj2s%2Fjssun%2Fsecurity%2Faction%2FGetPropertyAction.js;h=6a384eef6e7f919c5eab6b987ebdec1e965bdad5;hb=4231d40261fef32ce4570a6bbad0d35df44e8baf;hp=0000000000000000000000000000000000000000;hpb=c07eb2c5794833bd0241000d6844d783fe10cb82;p=jalview.git diff --git a/site/j2s/jssun/security/action/GetPropertyAction.js b/site/j2s/jssun/security/action/GetPropertyAction.js new file mode 100644 index 0000000..6a384ee --- /dev/null +++ b/site/j2s/jssun/security/action/GetPropertyAction.js @@ -0,0 +1,22 @@ +Clazz.declarePackage ("jssun.security.action"); +Clazz.load (["java.security.PrivilegedAction"], "jssun.security.action.GetPropertyAction", null, function () { +c$ = Clazz.decorateAsClass (function () { +this.theProp = null; +this.defaultVal = null; +Clazz.instantialize (this, arguments); +}, jssun.security.action, "GetPropertyAction", null, java.security.PrivilegedAction); +Clazz.makeConstructor (c$, +function (theProp) { +this.theProp = theProp; +}, "~S"); +Clazz.makeConstructor (c$, +function (theProp, defaultVal) { +this.theProp = theProp; +this.defaultVal = defaultVal; +}, "~S,~S"); +Clazz.overrideMethod (c$, "run", +function () { +var value = System.getProperty (this.theProp); +return (value == null ? this.defaultVal : value); +}); +});