equal
deleted
inserted
replaced
26 package sun.management; |
26 package sun.management; |
27 |
27 |
28 import java.util.*; |
28 import java.util.*; |
29 import java.io.IOException; |
29 import java.io.IOException; |
30 import java.lang.reflect.Method; |
30 import java.lang.reflect.Method; |
|
31 import javax.management.ObjectName; |
|
32 |
31 import com.sun.management.HotSpotDiagnosticMXBean; |
33 import com.sun.management.HotSpotDiagnosticMXBean; |
32 import com.sun.management.VMOption; |
34 import com.sun.management.VMOption; |
33 |
35 |
34 /** |
36 /** |
35 * Implementation of the diagnostic MBean for Hotspot VM. |
37 * Implementation of the diagnostic MBean for Hotspot VM. |
70 } |
72 } |
71 if (value == null) { |
73 if (value == null) { |
72 throw new NullPointerException("value cannot be null"); |
74 throw new NullPointerException("value cannot be null"); |
73 } |
75 } |
74 |
76 |
75 ManagementFactory.checkControlAccess(); |
77 Util.checkControlAccess(); |
76 Flag flag = Flag.getFlag(name); |
78 Flag flag = Flag.getFlag(name); |
77 if (flag == null) { |
79 if (flag == null) { |
78 throw new IllegalArgumentException("VM option \"" + |
80 throw new IllegalArgumentException("VM option \"" + |
79 name + "\" does not exist"); |
81 name + "\" does not exist"); |
80 } |
82 } |
111 throw new IllegalArgumentException("VM Option \"" + |
113 throw new IllegalArgumentException("VM Option \"" + |
112 name + "\" is of an unsupported type: " + |
114 name + "\" is of an unsupported type: " + |
113 v.getClass().getName()); |
115 v.getClass().getName()); |
114 } |
116 } |
115 } |
117 } |
|
118 |
|
119 public ObjectName getObjectName() { |
|
120 return Util.newObjectName("com.sun.management:type=HotSpotDiagnostic"); |
|
121 } |
116 } |
122 } |