|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfabric.common.Options
public abstract class Options
Field Summary | |
---|---|
static boolean |
DEBUG_NO_SSL
Whether to turn off SSL encryption for debugging purposes. |
protected static int |
USAGE_FLAG_WIDTH
The number of spaces from the left that the description for flags will be displayed. |
protected static int |
USAGE_SCREEN_WIDTH
The maximum width of a line when printing usage information. |
Constructor Summary | |
---|---|
protected |
Options()
|
protected |
Options(java.lang.String[] args)
|
Method Summary | |
---|---|
protected abstract int |
parseCommand(java.lang.String[] args,
int index)
Parses a command. |
void |
parseCommandLine(java.lang.String[] args)
|
protected abstract void |
setDefaultValues()
|
protected static void |
usageForFlag(java.io.PrintStream out,
java.lang.String flag,
java.lang.String desc)
Output a flag and a description of its usage in a nice format. |
protected static void |
usageForFlag(java.io.PrintStream out,
java.lang.String flag,
java.lang.String desc,
int defVal)
Output a flag and a description of its usage in a nice format. |
protected static void |
usageForFlag(java.io.PrintStream out,
java.lang.String flag,
java.lang.String desc,
java.lang.String defVal)
Output a flag and a description of its usage in a nice format. |
protected abstract void |
validateOptions()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static boolean DEBUG_NO_SSL
protected static final int USAGE_SCREEN_WIDTH
usageForFlag
.
protected static final int USAGE_FLAG_WIDTH
usageForFlag
.
Constructor Detail |
---|
protected Options()
protected Options(java.lang.String[] args) throws UsageError
UsageError
Method Detail |
---|
protected abstract void setDefaultValues()
protected abstract void validateOptions() throws UsageError
UsageError
protected abstract int parseCommand(java.lang.String[] args, int index) throws UsageError
UsageError
public void parseCommandLine(java.lang.String[] args) throws UsageError
UsageError
protected static void usageForFlag(java.io.PrintStream out, java.lang.String flag, java.lang.String desc)
out
- output PrintStreamflag
- the name of the flag.desc
- description of the flag.protected static void usageForFlag(java.io.PrintStream out, java.lang.String flag, java.lang.String desc, java.lang.String defVal)
out
- output PrintStreamflag
- the name of the flag.desc
- description of the flag.defVal
- default valueprotected static void usageForFlag(java.io.PrintStream out, java.lang.String flag, java.lang.String desc, int defVal)
out
- output PrintStreamflag
- the name of the flag.desc
- description of the flag.defVal
- default value
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |