This repository has been archived by the owner on Aug 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathRuntimeImpl.java
106 lines (84 loc) · 2.55 KB
/
RuntimeImpl.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
package sun.management;
import java.lang.management.RuntimeMXBean;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.Set;
import javax.management.ObjectName;
class RuntimeImpl implements RuntimeMXBean {
private final VMManagement jvm;
private final long vmStartupTime;
RuntimeImpl(VMManagement var1) {
this.jvm = var1;
this.vmStartupTime = this.jvm.getStartupTime();
}
public String getName() {
return this.jvm.getVmId();
}
public String getManagementSpecVersion() {
return this.jvm.getManagementVersion();
}
public String getVmName() {
return this.jvm.getVmName();
}
public String getVmVendor() {
return this.jvm.getVmVendor();
}
public String getVmVersion() {
return this.jvm.getVmVersion();
}
public String getSpecName() {
return this.jvm.getVmSpecName();
}
public String getSpecVendor() {
return this.jvm.getVmSpecVendor();
}
public String getSpecVersion() {
return this.jvm.getVmSpecVersion();
}
public String getClassPath() {
return this.jvm.getClassPath();
}
public String getLibraryPath() {
return this.jvm.getLibraryPath();
}
public String getBootClassPath() {
if (!this.isBootClassPathSupported()) {
throw new UnsupportedOperationException("Boot class path mechanism is not supported");
} else {
Util.checkMonitorAccess();
return this.jvm.getBootClassPath();
}
}
public List getInputArguments() {
java.util.ArrayList<String> result = new java.util.ArrayList<String>();
result.add("--version");
return result;
}
public long getUptime() {
return this.jvm.getUptime();
}
public long getStartTime() {
return this.vmStartupTime;
}
public boolean isBootClassPathSupported() {
return this.jvm.isBootClassPathSupported();
}
public Map getSystemProperties() {
Properties var1 = System.getProperties();
HashMap var2 = new HashMap();
Set var3 = var1.stringPropertyNames();
Iterator var4 = var3.iterator();
while (var4.hasNext()) {
String var5 = (String) var4.next();
String var6 = var1.getProperty(var5);
var2.put(var5, var6);
}
return var2;
}
public ObjectName getObjectName() {
return Util.newObjectName("java.lang:type=Runtime");
}
}