Mercurial > hg > graal-compiler
changeset 11559:ae00dd0ff81e
made methods for accessing HotSpot VM options static so they can be used without a HotSpotVMConfig object
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Tue, 10 Sep 2013 14:25:08 +0200 |
parents | c106320fab79 |
children | 1aa56a2fb08b |
files | graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotVMConfig.java |
diffstat | 1 files changed, 7 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotVMConfig.java Tue Sep 10 00:15:32 2013 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotVMConfig.java Tue Sep 10 14:25:08 2013 +0200 @@ -38,7 +38,7 @@ private static final long serialVersionUID = -4744897993263044184L; - private final HotSpotDiagnosticMXBean diagnostic = ManagementFactoryHelper.getDiagnosticMXBean(); + private static final HotSpotDiagnosticMXBean diagnostic = ManagementFactoryHelper.getDiagnosticMXBean(); HotSpotVMConfig(CompilerToVM c2vm) { c2vm.initializeConfiguration(this); @@ -52,9 +52,9 @@ * @return value of option * @throws IllegalArgumentException if option doesn't exist */ - private int getVMOptionInt(String name) { + public static int getVMOptionInt(String name) { String value = diagnostic.getVMOption(name).getValue(); - return new Integer(value).intValue(); + return Integer.valueOf(value).intValue(); } /** @@ -64,7 +64,7 @@ * @param defaultValue default value if option is not exists (e.g. development options) * @return value of option or defaultValue if option doesn't exist */ - private int getVMOption(String name, int defaultValue) { + public static int getVMOption(String name, int defaultValue) { try { return getVMOptionInt(name); } catch (IllegalArgumentException e) { @@ -79,9 +79,9 @@ * @return value of option * @throws IllegalArgumentException if option doesn't exist */ - private boolean getVMOption(String name) { + public static boolean getVMOption(String name) { String value = diagnostic.getVMOption(name).getValue(); - return new Boolean(value).booleanValue(); + return Boolean.valueOf(value).booleanValue(); } /** @@ -91,7 +91,7 @@ * @param defaultValue default value if option is not exists (e.g. development options) * @return value of option or defaultValue if option doesn't exist */ - private boolean getVMOption(String name, boolean defaultValue) { + public static boolean getVMOption(String name, boolean defaultValue) { try { return getVMOption(name); } catch (IllegalArgumentException e) {