|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface UsageFormatter
Used to format a command's usage.
CmdLineHandler| Method Summary | |
|---|---|
java.lang.String |
formatErrorMsg(java.lang.String msg)
Gets an error message, reformatted in a manner to "go well with" the usage statement. |
java.lang.String |
formatUsage(java.lang.String cmdName,
java.lang.String cmdDesc,
java.util.Map<java.lang.String,Parameter<?>> opts,
java.util.List<Parameter<?>> args,
boolean showHidden)
gets the usage for the command |
int |
getLineLength()
Gets the maximum line length to use for usage display. |
void |
setLineLength(int lineLength)
Sets the maximum line length to use for usage display. |
| Method Detail |
|---|
java.lang.String formatErrorMsg(java.lang.String msg)
formatErrorMsg("invalid filename")
Might return:
<b>ERROR:</b> invalid filename
msg - the text of the error message
java.lang.String formatUsage(java.lang.String cmdName,
java.lang.String cmdDesc,
java.util.Map<java.lang.String,Parameter<?>> opts,
java.util.List<Parameter<?>> args,
boolean showHidden)
showHidden - if true, hidden parameters will be displayed
int getLineLength()
setLineLength()void setLineLength(int lineLength)
lineLength - the maximum line length to use for usage displaygetLineLength()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||