|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.edg.data.util.ClientHelp
Helper class to do the help message formatting. This class is not thread-safe.
Constructor Summary | |
ClientHelp(int width,
int startCommand,
int startShortHand,
int startDesc)
Constructor. |
Method Summary | |
void |
printArgument(java.lang.String command,
java.lang.String help)
|
void |
printCommandHelp(org.edg.data.util.CommandDescriptor desc)
|
void |
println()
output a blank line to the help text |
void |
println(java.lang.String line)
output a line of help |
void |
printUsageBlock(java.lang.String commandUsage,
org.apache.commons.cli.Options opts)
print a usage block. |
void |
printUsageBlock(java.lang.String commandUsage,
java.lang.String header,
org.apache.commons.cli.Options opts,
java.lang.String footer)
print a usage block. |
java.lang.String |
toString()
return the help text currently stored |
void |
writeTo(java.io.PrintStream p)
Output the help to a PrintStream , e.g. |
void |
writeTo(java.io.PrintWriter p)
Output the help to a PrintWriter |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public ClientHelp(int width, int startCommand, int startShortHand, int startDesc)
width
- the total width of the helpstartCommand
- the starting position where the command should be setstartShortHand
- the starting position for the shorthand
notation (0 if there is none)startDesc
- the starting position for the description.Method Detail |
public void printCommandHelp(org.edg.data.util.CommandDescriptor desc)
public void printArgument(java.lang.String command, java.lang.String help)
public void printUsageBlock(java.lang.String commandUsage, org.apache.commons.cli.Options opts)
commandUsage
and opts
must not be null
commandUsage
- opts
- public void printUsageBlock(java.lang.String commandUsage, java.lang.String header, org.apache.commons.cli.Options opts, java.lang.String footer)
commandUsage
and opts
must not be null
.
commandUsage
- header
- opts
- footer
- public void println()
public void println(java.lang.String line)
line
- the help linepublic void writeTo(java.io.PrintStream p)
PrintStream
, e.g. System.out
p
- the PrintStreampublic void writeTo(java.io.PrintWriter p)
PrintWriter
p
- the PrintWriterpublic java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |