Class VMOption
public class VMOption extends Object
origin. Each VM option has a default value. A VM option can be set at VM creation time typically as a command line argument to the launcher or an argument passed to the VM created using the JNI invocation interface. In addition, a VM option may be set via an environment variable or a configuration file. A VM option can also be set dynamically via a management interface after the VM was started. A VMOption contains the value of a VM option and the origin of that value at the time this VMOption object was constructed. The value of the VM option may be changed after the VMOption object was constructed,
- Since:
- 1.6
Nested Class Summary
| Modifier and Type | Class | Description |
|---|---|---|
static enum |
VMOption.Origin |
Origin of the value of a VM option. |
Constructor Summary
| Constructor | Description |
|---|---|
VMOption |
Constructs a VMOption. |
Method Summary
| Modifier and Type | Method | Description |
|---|---|---|
static VMOption |
from |
Returns a VMOption object represented by the given CompositeData. |
String |
getName() |
Returns the name of this VM option. |
VMOption.Origin |
getOrigin() |
Returns the origin of the value of this VM option. |
String |
getValue() |
Returns the value of this VM option at the time when this VMOption was created. |
boolean |
isWriteable() |
Tests if this VM option is writeable. |
Methods declared in class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | Modifier and Type | Method | Description |
|---|---|---|
protected Object |
clone() |
Creates and returns a copy of this object. |
boolean |
equals |
Indicates whether some other object is "equal to" this one. |
protected void |
finalize() |
Deprecated, for removal: This API element is subject to removal in a future version. Finalization is deprecated and subject to removal in a future release. |
final Class |
getClass() |
Returns the runtime class of this Object. |
int |
hashCode() |
Returns a hash code value for this object. |
final void |
notify() |
Wakes up a single thread that is waiting on this object's monitor. |
final void |
notifyAll() |
Wakes up all threads that are waiting on this object's monitor. |
String |
toString() |
Returns a string representation of the object. |
final void |
wait() |
Causes the current thread to wait until it is awakened, typically by being notified or interrupted. |
final void |
wait |
Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed. |
final void |
wait |
Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed. |
Constructor Details
VMOption
public VMOption(String name, String value, boolean writeable, VMOption.Origin origin)
VMOption.- Parameters:
-
name- Name of a VM option. -
value- Value of a VM option. -
writeable-trueif a VM option can be set dynamically, orfalseotherwise. -
origin- where the value of a VM option came from. - Throws:
-
NullPointerException- if the name or value isnull
Method Details
getName
public String getName()
- Returns:
- the name of this VM option.
getValue
public String getValue()
VMOption was created. The value could have been changed.- Returns:
- the value of the VM option at the time when this
VMOptionwas created.
getOrigin
public VMOption.Origin getOrigin()
- Returns:
- where the value of this VM option came from.
isWriteable
public boolean isWriteable()
HotSpotDiagnosticMXBean.setVMOption method.- Returns:
-
trueif this VM option is writeable;falseotherwise.
from
public static VMOption from(CompositeData cd)
VMOption object represented by the given CompositeData. The given CompositeData must contain the following attributes:
Attribute Name Type name java.lang.Stringvalue java.lang.Stringorigin java.lang.Stringwriteable java.lang.Boolean
- Parameters:
-
cd-CompositeDatarepresenting aVMOption - Returns:
- a
VMOptionobject represented bycdifcdis notnull;nullotherwise. - Throws:
-
IllegalArgumentException- ifcddoes not represent aVMOptionwith the attributes described above.
© 1993, 2025, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.