public class StdCmdLinePrinter extends Object implements CmdLinePrinter
CmdLinePrinter
.Constructor and Description |
---|
StdCmdLinePrinter() |
public String printActionHelp(CmdLineAction action, Set<CmdLineOption> options)
CmdLinePrinter
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–2017 Apache OODT. All rights reserved.