DEFAULT_ARG_NAME
public static final String DEFAULT_ARG_NAME
DEFAULT_DESC_PAD
public static final int DEFAULT_DESC_PAD
DEFAULT_LEFT_PAD
public static final int DEFAULT_LEFT_PAD
DEFAULT_LONG_OPT_PREFIX
public static final String DEFAULT_LONG_OPT_PREFIX
DEFAULT_OPT_PREFIX
public static final String DEFAULT_OPT_PREFIX
DEFAULT_SYNTAX_PREFIX
public static final String DEFAULT_SYNTAX_PREFIX
DEFAULT_WIDTH
public static final int DEFAULT_WIDTH
defaultArgName
public String defaultArgName
defaultDescPad
public int defaultDescPad
defaultLeftPad
public int defaultLeftPad
defaultLongOptPrefix
public String defaultLongOptPrefix
defaultNewLine
public String defaultNewLine
defaultOptPrefix
public String defaultOptPrefix
defaultSyntaxPrefix
public String defaultSyntaxPrefix
defaultWidth
public int defaultWidth
createPadding
protected String createPadding(int len)
findWrapPos
protected int findWrapPos(String text,
int width,
int startPos)
Finds the next text wrap position after startPos
for the text
in sb
with the column width width
.
The wrap point is the last postion before startPos+width having a whitespace
character (space, \n, \r).
width
- width of the wrapped textstartPos
- position from which to start the lookup whitespace character
- postion on which the text must be wrapped or -1 if the wrap position is at the end
of the text
printHelp
public void printHelp(PrintWriter pw,
int width,
String cmdLineSyntax,
String header,
Options options,
int leftPad,
int descPad,
String footer)
throws IllegalArgumentException
printHelp
public void printHelp(PrintWriter pw,
int width,
String cmdLineSyntax,
String header,
Options options,
int leftPad,
int descPad,
String footer,
boolean autoUsage)
throws IllegalArgumentException
printHelp
public void printHelp(String cmdLineSyntax,
String header,
Options options,
String footer)
printHelp
public void printHelp(String cmdLineSyntax,
String header,
Options options,
String footer,
boolean autoUsage)
printHelp
public void printHelp(String cmdLineSyntax,
Options options)
printHelp
public void printHelp(String cmdLineSyntax,
Options options,
boolean autoUsage)
printHelp
public void printHelp(int width,
String cmdLineSyntax,
String header,
Options options,
String footer)
printHelp
public void printHelp(int width,
String cmdLineSyntax,
String header,
Options options,
String footer,
boolean autoUsage)
printOptions
public void printOptions(PrintWriter pw,
int width,
Options options,
int leftPad,
int descPad)
printUsage
public void printUsage(PrintWriter pw,
int width,
String cmdLineSyntax)
printUsage
public void printUsage(PrintWriter pw,
int width,
String app,
Options options)
Prints the usage statement for the specified application.
pw
- The PrintWriter to print the usage statementwidth
- ??options
- The command line Options
printWrapped
public void printWrapped(PrintWriter pw,
int width,
String text)
printWrapped
public void printWrapped(PrintWriter pw,
int width,
int nextLineTabStop,
String text)
renderOptions
protected StringBuffer renderOptions(StringBuffer sb,
int width,
Options options,
int leftPad,
int descPad)
renderWrappedText
protected StringBuffer renderWrappedText(StringBuffer sb,
int width,
int nextLineTabStop,
String text)
rtrim
protected String rtrim(String s)