public final class GfxdHelpFormatter
extends org.apache.commons.cli.HelpFormatter
HelpFormatter to change formatting as per
GemFireXD (in particular use '=' to separate option and value rather than a
space). Like GfxdOption this will probably better also go into a
modified version of commons CLI HelpFormatter since that class does
not look to be designed to be overridden.DEFAULT_ARG_NAME, DEFAULT_DESC_PAD, DEFAULT_LEFT_PAD, DEFAULT_LONG_OPT_PREFIX, DEFAULT_LONG_OPT_SEPARATOR, DEFAULT_OPT_PREFIX, DEFAULT_SYNTAX_PREFIX, DEFAULT_WIDTH, defaultArgName, defaultDescPad, defaultLeftPad, defaultLongOptPrefix, defaultNewLine, defaultOptPrefix, defaultSyntaxPrefix, defaultWidth, optionComparator| Constructor and Description |
|---|
GfxdHelpFormatter() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
appendOption(StringBuilder buff,
org.apache.commons.cli.Option option,
boolean required)
Appends the usage clause for an Option to a StringBuffer.
|
protected void |
appendOptionGroup(StringBuilder buff,
org.apache.commons.cli.OptionGroup group)
Appends the usage clause for an OptionGroup to a StringBuilder.
|
String |
getSyntaxPrefix()
Returns the 'syntaxPrefix'.
|
void |
printUsage(PrintWriter pw,
int width,
String cmdLineSyntax)
Print the cmdLineSyntax to the specified writer, using the specified width.
|
void |
printUsage(PrintWriter pw,
int width,
String app,
org.apache.commons.cli.Options options)
Prints the usage statement for the specified application.
|
protected StringBuffer |
renderOptions(StringBuffer sb,
int width,
org.apache.commons.cli.Options options,
int leftPad,
int descPad)
Render the specified Options and return the rendered Options in a
StringBuffer.
|
createPadding, findWrapPos, getArgName, getDescPadding, getLeftPadding, getLongOptPrefix, getLongOptSeparator, getNewLine, getOptionComparator, getOptPrefix, getWidth, printHelp, printHelp, printHelp, printHelp, printHelp, printHelp, printHelp, printHelp, printOptions, printWrapped, printWrapped, renderWrappedText, rtrim, setArgName, setDescPadding, setLeftPadding, setLongOptPrefix, setLongOptSeparator, setNewLine, setOptionComparator, setOptPrefix, setSyntaxPrefix, setWidthpublic void printUsage(PrintWriter pw, int width, String cmdLineSyntax)
printUsage in class org.apache.commons.cli.HelpFormatterpw - The printWriter to write the help towidth - The number of characters per line for the usage statement.cmdLineSyntax - The usage statement.public void printUsage(PrintWriter pw, int width, String app, org.apache.commons.cli.Options options)
Prints the usage statement for the specified application.
printUsage in class org.apache.commons.cli.HelpFormatterpw - The PrintWriter to print the usage statementwidth - The number of characters to display per lineapp - The application nameoptions - The command line Optionspublic String getSyntaxPrefix()
getSyntaxPrefix in class org.apache.commons.cli.HelpFormatterprotected void appendOptionGroup(StringBuilder buff, org.apache.commons.cli.OptionGroup group)
buff - the StringBuilder to append togroup - the group to appendHelpFormatter.appendOption(StringBuffer,Option,boolean)protected void appendOption(StringBuilder buff, org.apache.commons.cli.Option option, boolean required)
buff - the StringBuffer to append tooption - the Option to appendrequired - whether the Option is required or notprotected StringBuffer renderOptions(StringBuffer sb, int width, org.apache.commons.cli.Options options, int leftPad, int descPad)
renderOptions in class org.apache.commons.cli.HelpFormattersb - The StringBuffer to place the rendered Options into.width - The number of characters to display per lineoptions - The command line OptionsleftPad - the number of characters of padding to be prefixed to each linedescPad - the number of characters of padding to be prefixed to each
description lineCopyright © 2010-2015 Pivotal Software, Inc. All rights reserved.