- java.lang.Object
- 
- com.sun.management.VMOption
 
- 
 public class VMOption extends Object Information about a VM option including its value and where the value came from which is referred as itsorigin.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 VMOptioncontains the value of a VM option and the origin of that value at the time thisVMOptionobject was constructed. The value of the VM option may be changed after theVMOptionobject was constructed,- Since:
- 1.6
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classVMOption.OriginOrigin of the value of a VM option.
 - 
Constructor SummaryConstructors Constructor Description VMOption(String name, String value, boolean writeable, VMOption.Origin origin)Constructs aVMOption.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static VMOptionfrom(CompositeData cd)Returns aVMOptionobject represented by the givenCompositeData.StringgetName()Returns the name of this VM option.VMOption.OrigingetOrigin()Returns the origin of the value of this VM option.StringgetValue()Returns the value of this VM option at the time when thisVMOptionwas created.booleanisWriteable()Tests if this VM option is writeable.
 
- 
- 
- 
Constructor Detail- 
VMOptionpublic VMOption(String name, String value, boolean writeable, VMOption.Origin origin) Constructs aVMOption.- Parameters:
- name- Name of a VM option.
- value- Value of a VM option.
- writeable-- trueif a VM option can be set dynamically, or- falseotherwise.
- origin- where the value of a VM option came from.
- Throws:
- NullPointerException- if the name or value is- null
 
 
- 
 - 
Method Detail- 
getNamepublic String getName() Returns the name of this VM option.- Returns:
- the name of this VM option.
 
 - 
getValuepublic String getValue() Returns the value of this VM option at the time when thisVMOptionwas created. The value could have been changed.- Returns:
- the value of the VM option at the time when
         this VMOptionwas created.
 
 - 
getOriginpublic VMOption.Origin getOrigin() Returns the origin of the value of this VM option. That is, where the value of this VM option came from.- Returns:
- where the value of this VM option came from.
 
 - 
isWriteablepublic boolean isWriteable() Tests if this VM option is writeable. If this VM option is writeable, it can be set by theHotSpotDiagnosticMXBean.setVMOptionmethod.- Returns:
- trueif this VM option is writeable;- falseotherwise.
 
 - 
frompublic static VMOption from(CompositeData cd) Returns aVMOptionobject represented by the givenCompositeData. The givenCompositeDatamust contain the following attributes:Attribute Name Type name java.lang.Stringvalue java.lang.Stringorigin java.lang.Stringwriteable java.lang.Boolean- Parameters:
- cd-- CompositeDatarepresenting a- VMOption
- Returns:
- a VMOptionobject represented bycdifcdis notnull;nullotherwise.
- Throws:
- IllegalArgumentException- if- cddoes not represent a- VMOptionwith the attributes described above.
 
 
- 
 
-