1 Clazz.declarePackage ("java.util.logging");
2 Clazz.load (null, "java.util.logging.LogRecord", ["java.lang.NullPointerException", "$.Throwable"], function () {
3 c$ = Clazz.decorateAsClass (function () {
5 this.sequenceNumber = 0;
6 this.sourceClassName = null;
7 this.sourceMethodName = null;
12 this.loggerName = null;
13 this.resourceBundleName = null;
14 this.needToInferCaller = false;
15 this.parameters = null;
16 this.resourceBundle = null;
17 Clazz.instantialize (this, arguments);
18 }, java.util.logging, "LogRecord", null, java.io.Serializable);
19 Clazz.makeConstructor (c$,
20 function (level, msg) {
24 this.millis = System.currentTimeMillis ();
25 this.needToInferCaller = true;
26 }, "java.util.logging.Level,~S");
27 Clazz.defineMethod (c$, "getLoggerName",
29 return this.loggerName;
31 Clazz.defineMethod (c$, "setLoggerName",
33 this.loggerName = name;
35 Clazz.defineMethod (c$, "getResourceBundle",
37 return this.resourceBundle;
39 Clazz.defineMethod (c$, "setResourceBundle",
41 this.resourceBundle = bundle;
42 }, "java.util.ResourceBundle");
43 Clazz.defineMethod (c$, "getResourceBundleName",
45 return this.resourceBundleName;
47 Clazz.defineMethod (c$, "setResourceBundleName",
49 this.resourceBundleName = name;
51 Clazz.defineMethod (c$, "getLevel",
55 Clazz.defineMethod (c$, "setLevel",
58 throw new NullPointerException ();
60 }, "java.util.logging.Level");
61 Clazz.defineMethod (c$, "getSequenceNumber",
63 return this.sequenceNumber;
65 Clazz.defineMethod (c$, "setSequenceNumber",
67 this.sequenceNumber = seq;
69 Clazz.defineMethod (c$, "getSourceClassName",
71 if (this.needToInferCaller) {
73 }return this.sourceClassName;
75 Clazz.defineMethod (c$, "setSourceClassName",
76 function (sourceClassName) {
77 this.sourceClassName = sourceClassName;
78 this.needToInferCaller = false;
80 Clazz.defineMethod (c$, "getSourceMethodName",
82 if (this.needToInferCaller) {
84 }return this.sourceMethodName;
86 Clazz.defineMethod (c$, "setSourceMethodName",
87 function (sourceMethodName) {
88 this.sourceMethodName = sourceMethodName;
89 this.needToInferCaller = false;
91 Clazz.defineMethod (c$, "getMessage",
95 Clazz.defineMethod (c$, "setMessage",
97 this.message = message;
99 Clazz.defineMethod (c$, "getParameters",
101 return this.parameters;
103 Clazz.defineMethod (c$, "setParameters",
104 function (parameters) {
105 this.parameters = parameters;
107 Clazz.defineMethod (c$, "getThreadID",
109 return this.threadID;
111 Clazz.defineMethod (c$, "setThreadID",
112 function (threadID) {
113 this.threadID = threadID;
115 Clazz.defineMethod (c$, "getMillis",
119 Clazz.defineMethod (c$, "setMillis",
121 this.millis = millis;
123 Clazz.defineMethod (c$, "getThrown",
127 Clazz.defineMethod (c$, "setThrown",
129 this.thrown = thrown;
131 Clazz.defineMethod (c$, "inferCaller",
133 this.needToInferCaller = false;
134 var stack = ( new Throwable ()).getStackTrace ();
136 while (ix < stack.length) {
137 var frame = stack[ix];
138 var cname = frame.getClassName ();
139 if (cname.equals ("java.util.logging.Logger")) {
143 while (ix < stack.length) {
144 var frame = stack[ix];
145 var cname = frame.getClassName ();
146 if (!cname.equals ("java.util.logging.Logger")) {
147 this.setSourceClassName (cname);
148 this.setSourceMethodName (frame.getMethodName ());
153 Clazz.defineStatics (c$,
154 "globalSequenceNumber", 0);