public class StdCmdLinePrinter extends Object implements CmdLinePrinter
CmdLinePrinter
.Constructor and Description |
---|
StdCmdLinePrinter() |
Modifier and Type | Method and Description |
---|---|
protected String |
getDescription(CmdLineAction action) |
protected String |
getExamples(CmdLineAction action) |
protected String |
getFooter() |
protected String |
getFooter(CmdLineAction action) |
protected String |
getGroupHelp(CmdLineAction action,
GroupCmdLineOption option,
String indent) |
protected String |
getHeader() |
protected String |
getHeader(CmdLineAction action) |
protected String |
getOptionalOptionHelp(CmdLineAction action,
CmdLineOption option) |
protected String |
getOptionalSubHeader() |
protected String |
getOptionHelp(CmdLineAction action,
CmdLineOption option,
String indent) |
protected String |
getOptionHelp(CmdLineOption option,
String indent) |
protected String |
getRequiredOptionHelp(CmdLineAction action,
CmdLineOption option) |
protected String |
getRequiredSubHeader() |
protected String |
getUsage(CmdLineAction action,
Set<CmdLineOption> options) |
String |
printActionHelp(CmdLineAction action,
Set<CmdLineOption> options)
Should generate help message for action specified by
#CmdLineArgs.getSpecifiedAction() . |
String |
printActionMessages(List<String> messages)
Generates
CmdLineAction message from list of messages. |
String |
printActionsHelp(Set<CmdLineAction> actions)
Generates help messages given
CmdLineAction s. |
String |
printOptionsHelp(Set<CmdLineOption> options)
Generates help message for given
CmdLineOption s. |
String |
printOptionValidationErrors(List<CmdLineOptionValidator.Result> results)
Generate validation error message for results of failed validations.
|
String |
printRequiredOptionsMissingError(Set<CmdLineOption> missingOptions)
Generates missing required options error message from given
CmdLineOption s which where required and not specified. |
public String printActionHelp(CmdLineAction action, Set<CmdLineOption> options)
CmdLinePrinter
#CmdLineArgs.getSpecifiedAction()
.printActionHelp
in interface CmdLinePrinter
action
- CmdLineAction
for which help will be generateoptions
- Supported CmdLineOption
sprotected String getHeader(CmdLineAction action)
protected String getDescription(CmdLineAction action)
protected String getUsage(CmdLineAction action, Set<CmdLineOption> options)
protected String getRequiredSubHeader()
protected String getRequiredOptionHelp(CmdLineAction action, CmdLineOption option)
protected String getOptionalSubHeader()
protected String getOptionalOptionHelp(CmdLineAction action, CmdLineOption option)
protected String getExamples(CmdLineAction action)
protected String getFooter(CmdLineAction action)
protected String getOptionHelp(CmdLineAction action, CmdLineOption option, String indent)
protected String getGroupHelp(CmdLineAction action, GroupCmdLineOption option, String indent)
public String printActionsHelp(Set<CmdLineAction> actions)
CmdLinePrinter
CmdLineAction
s.printActionsHelp
in interface CmdLinePrinter
actions
- CmdLineAction
s to print help forCmdLineAction
spublic String printOptionsHelp(Set<CmdLineOption> options)
CmdLinePrinter
CmdLineOption
s.printOptionsHelp
in interface CmdLinePrinter
options
- CmdLineOption
s for which help message will be generatedCmdLineOption
sprotected String getHeader()
protected String getOptionHelp(CmdLineOption option, String indent)
protected String getFooter()
public String printOptionValidationErrors(List<CmdLineOptionValidator.Result> results)
CmdLinePrinter
printOptionValidationErrors
in interface CmdLinePrinter
results
- List
of FAILed validationspublic String printRequiredOptionsMissingError(Set<CmdLineOption> missingOptions)
CmdLinePrinter
CmdLineOption
s which where required and not specified.printRequiredOptionsMissingError
in interface CmdLinePrinter
missingOptions
- Set
of CmdLineOption
s which where required and
not set.public String printActionMessages(List<String> messages)
CmdLinePrinter
CmdLineAction
message from list of messages.printActionMessages
in interface CmdLinePrinter
messages
- The messages from a CmdLineAction
Copyright © 1999-2015 Apache OODT. All Rights Reserved.