< prev index next >

src/java.management/share/classes/com/sun/management/VMOption.java

Print this page

        

*** 40,53 **** * 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 <tt>VMOption</tt> contains the value of a VM option ! * and the origin of that value at the time this <tt>VMOption</tt> * object was constructed. The value of the VM option ! * may be changed after the <tt>VMOption</tt> object was constructed, * * @see <a href="{@docRoot}/../../../../technotes/guides/vm/index.html"> * Java Virtual Machine</a> * @author Mandy Chung * @since 1.6 --- 40,53 ---- * 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 {@code VMOption} contains the value of a VM option ! * and the origin of that value at the time this {@code VMOption} * object was constructed. The value of the VM option ! * may be changed after the {@code VMOption} object was constructed, * * @see <a href="{@docRoot}/../../../../technotes/guides/vm/index.html"> * Java Virtual Machine</a> * @author Mandy Chung * @since 1.6
*** 106,134 **** */ OTHER } /** ! * Constructs a <tt>VMOption</tt>. * * @param name Name of a VM option. * @param value Value of a VM option. ! * @param writeable <tt>true</tt> if a VM option can be set dynamically, ! * or <tt>false</tt> otherwise. * @param origin where the value of a VM option came from. * ! * @throws NullPointerException if the name or value is <tt>null</tt> */ public VMOption(String name, String value, boolean writeable, Origin origin) { this.name = name; this.value = value; this.writeable = writeable; this.origin = origin; } /** ! * Constructs a <tt>VMOption</tt> object from a * {@link CompositeData CompositeData}. */ private VMOption(CompositeData cd) { // validate the input composite data VMOptionCompositeData.validateCompositeData(cd); --- 106,134 ---- */ OTHER } /** ! * Constructs a {@code VMOption}. * * @param name Name of a VM option. * @param value Value of a VM option. ! * @param writeable {@code true} if a VM option can be set dynamically, ! * or {@code false} otherwise. * @param origin where the value of a VM option came from. * ! * @throws NullPointerException if the name or value is {@code null} */ public VMOption(String name, String value, boolean writeable, Origin origin) { this.name = name; this.value = value; this.writeable = writeable; this.origin = origin; } /** ! * Constructs a {@code VMOption} object from a * {@link CompositeData CompositeData}. */ private VMOption(CompositeData cd) { // validate the input composite data VMOptionCompositeData.validateCompositeData(cd);
*** 148,161 **** return name; } /** * Returns the value of this VM option at the time when ! * this <tt>VMOption</tt> was created. The value could have been changed. * * @return the value of the VM option at the time when ! * this <tt>VMOption</tt> was created. */ public String getValue() { return value; } --- 148,161 ---- return name; } /** * Returns the value of this VM option at the time when ! * this {@code VMOption} was created. The value could have been changed. * * @return the value of the VM option at the time when ! * this {@code VMOption} was created. */ public String getValue() { return value; }
*** 172,182 **** /** * Tests if this VM option is writeable. If this VM option is writeable, * it can be set by the {@link HotSpotDiagnosticMXBean#setVMOption * HotSpotDiagnosticMXBean.setVMOption} method. * ! * @return <tt>true</tt> if this VM option is writeable; <tt>false</tt> * otherwise. */ public boolean isWriteable() { return writeable; } --- 172,182 ---- /** * Tests if this VM option is writeable. If this VM option is writeable, * it can be set by the {@link HotSpotDiagnosticMXBean#setVMOption * HotSpotDiagnosticMXBean.setVMOption} method. * ! * @return {@code true} if this VM option is writeable; {@code false} * otherwise. */ public boolean isWriteable() { return writeable; }
*** 187,234 **** " origin: " + origin + " " + (writeable ? "(read-write)" : "(read-only)"); } /** ! * Returns a <tt>VMOption</tt> object represented by the ! * given <tt>CompositeData</tt>. The given <tt>CompositeData</tt> * must contain the following attributes: ! * <p> * <blockquote> * <table border> * <tr> * <th align=left>Attribute Name</th> * <th align=left>Type</th> * </tr> * <tr> * <td>name</td> ! * <td><tt>java.lang.String</tt></td> * </tr> * <tr> * <td>value</td> ! * <td><tt>java.lang.String</tt></td> * </tr> * <tr> * <td>origin</td> ! * <td><tt>java.lang.String</tt></td> * </tr> * <tr> * <td>writeable</td> ! * <td><tt>java.lang.Boolean</tt></td> * </tr> * </table> * </blockquote> * ! * @param cd <tt>CompositeData</tt> representing a <tt>VMOption</tt> * ! * @throws IllegalArgumentException if <tt>cd</tt> does not ! * represent a <tt>VMOption</tt> with the attributes described * above. * ! * @return a <tt>VMOption</tt> object represented by <tt>cd</tt> ! * if <tt>cd</tt> is not <tt>null</tt>; ! * <tt>null</tt> otherwise. */ public static VMOption from(CompositeData cd) { if (cd == null) { return null; } --- 187,234 ---- " origin: " + origin + " " + (writeable ? "(read-write)" : "(read-only)"); } /** ! * Returns a {@code VMOption} object represented by the ! * given {@code CompositeData}. The given {@code CompositeData} * must contain the following attributes: ! * * <blockquote> * <table border> * <tr> * <th align=left>Attribute Name</th> * <th align=left>Type</th> * </tr> * <tr> * <td>name</td> ! * <td>{@code java.lang.String}</td> * </tr> * <tr> * <td>value</td> ! * <td>{@code java.lang.String}</td> * </tr> * <tr> * <td>origin</td> ! * <td>{@code java.lang.String}</td> * </tr> * <tr> * <td>writeable</td> ! * <td>{@code java.lang.Boolean}</td> * </tr> * </table> * </blockquote> * ! * @param cd {@code CompositeData} representing a {@code VMOption} * ! * @throws IllegalArgumentException if {@code cd} does not ! * represent a {@code VMOption} with the attributes described * above. * ! * @return a {@code VMOption} object represented by {@code cd} ! * if {@code cd} is not {@code null}; ! * {@code null} otherwise. */ public static VMOption from(CompositeData cd) { if (cd == null) { return null; }
< prev index next >