|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.vmutil.options.OptionSet org.jikesrvm.options.OptionSet
public final class OptionSet
Class to handle command-line arguments and options for GC.
Field Summary | |
---|---|
static OptionSet |
gc
|
private String |
prefix
|
Constructor Summary | |
---|---|
private |
OptionSet(String prefix)
|
Method Summary | |
---|---|
protected int |
bytesToPages(Extent bytes)
Convert bytes into pages, rounding up if necessary. |
protected String |
computeKey(String name)
Determine the VM specific key for a given option name. |
protected void |
fail(Option o,
String message)
A fatal error occurred during the setting of an option. |
protected void |
logNewLine()
Print a new line. |
protected void |
logString(String s)
Log a string. |
protected void |
logValue(Option o,
boolean forXml)
Format and log an option value. |
protected Extent |
pagesToBytes(int pages)
Convert from pages into bytes. |
void |
printHelp()
Print a short description of every option |
void |
printOptions()
Print out the option values |
boolean |
process(String arg)
Take a string (most likely a command-line argument) and try to proccess it as an option command. |
protected void |
warn(Option o,
String message)
A non-fatal error occurred during the setting of an option. |
Methods inherited from class org.vmutil.options.OptionSet |
---|
getFirst, getOption, log, logChange, logXml, logXml |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private String prefix
public static final OptionSet gc
Constructor Detail |
---|
private OptionSet(String prefix)
Method Detail |
---|
public boolean process(String arg)
arg
- a String to try to process as an option command
true
if successful, false
otherwisepublic void printHelp()
public void printOptions()
protected void logValue(Option o, boolean forXml)
OptionSet
logValue
in class OptionSet
o
- The option.forXml
- Is this part of XML output?protected void logString(String s)
OptionSet
logString
in class OptionSet
protected void logNewLine()
OptionSet
logNewLine
in class OptionSet
protected String computeKey(String name)
OptionSet
computeKey
in class OptionSet
name
- The option name.
protected void warn(Option o, String message)
OptionSet
warn
in class OptionSet
o
- The responsible option.message
- The message associated with the warning.protected void fail(Option o, String message)
OptionSet
fail
in class OptionSet
o
- The responsible option.message
- The error message associated with the failure.protected int bytesToPages(Extent bytes)
OptionSet
bytesToPages
in class OptionSet
bytes
- The number of bytes.
protected Extent pagesToBytes(int pages)
OptionSet
pagesToBytes
in class OptionSet
pages
- the number of pages.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |