078fa84671019497375c26c4feca05b673bcdf75
[jalviewjs.git] / site / swingjs / j2s / java / util / PropertyResourceBundle.js
1 Clazz.declarePackage ("java.util");
2 Clazz.load (["java.util.ResourceBundle"], "java.util.PropertyResourceBundle", ["java.lang.NullPointerException", "java.util.HashMap", "java.util.Properties", "jssun.util.ResourceBundleEnumeration"], function () {
3 c$ = Clazz.decorateAsClass (function () {
4 this.lookup = null;
5 Clazz.instantialize (this, arguments);
6 }, java.util, "PropertyResourceBundle", java.util.ResourceBundle);
7 Clazz.makeConstructor (c$, 
8 function (stream) {
9 Clazz.superConstructor (this, java.util.PropertyResourceBundle, []);
10 this.setStream (stream);
11 }, "java.io.InputStream");
12 Clazz.defineMethod (c$, "setStream", 
13 function (stream) {
14 var properties =  new java.util.Properties ();
15 properties.load (stream);
16 this.lookup =  new java.util.HashMap (properties);
17 return this;
18 }, "java.io.InputStream");
19 Clazz.makeConstructor (c$, 
20 function (reader) {
21 Clazz.superConstructor (this, java.util.PropertyResourceBundle, []);
22 var properties =  new java.util.Properties ();
23 properties.load (reader);
24 this.lookup =  new java.util.HashMap (properties);
25 }, "java.io.Reader");
26 Clazz.makeConstructor (c$, 
27 function () {
28 Clazz.superConstructor (this, java.util.PropertyResourceBundle, []);
29 });
30 Clazz.overrideMethod (c$, "handleGetObject", 
31 function (key) {
32 if (key == null) {
33 throw  new NullPointerException ();
34 }return this.lookup.get (key);
35 }, "~S");
36 Clazz.defineMethod (c$, "getKeys", 
37 function () {
38 var parent = this.parent;
39 return  new jssun.util.ResourceBundleEnumeration (this.lookup.keySet (), (parent != null) ? parent.getKeys () : null);
40 });
41 Clazz.overrideMethod (c$, "handleKeySet", 
42 function () {
43 return this.lookup.keySet ();
44 });
45 });