public static class Completers.OptDesc extends Object
| Modifier | Constructor and Description |
|---|---|
protected |
OptDesc() |
|
OptDesc(String shortOption,
String longOption)
Command option description.
|
|
OptDesc(String shortOption,
String longOption,
Completer valueCompleter)
Command option description.
|
|
OptDesc(String shortOption,
String longOption,
String description)
Command option description.
|
|
OptDesc(String shortOption,
String longOption,
String description,
Completer valueCompleter)
Command option description.
|
| Modifier and Type | Method and Description |
|---|---|
protected static List<Completers.OptDesc> |
compile(Map<String,List<String>> optionValues,
Collection<String> options) |
protected void |
completeOption(LineReader reader,
ParsedLine commandLine,
List<Candidate> candidates,
boolean longOpt) |
protected boolean |
completeValue(LineReader reader,
ParsedLine commandLine,
List<Candidate> candidates,
String curBuf,
String partialValue) |
String |
description() |
protected boolean |
hasValue() |
String |
longOption() |
protected boolean |
match(String option) |
void |
setValueCompleter(Completer valueCompleter) |
String |
shortOption() |
protected boolean |
startsWith(String option) |
protected Completer |
valueCompleter() |
public OptDesc(String shortOption, String longOption, String description, Completer valueCompleter)
shortOption - short optionlongOption - long optiondescription - short option descriptionvalueCompleter - option value completerpublic OptDesc(String shortOption, String longOption, Completer valueCompleter)
shortOption - short optionlongOption - long optionvalueCompleter - option value completerpublic OptDesc(String shortOption, String longOption, String description)
shortOption - short optionlongOption - long optiondescription - short option descriptionpublic OptDesc(String shortOption, String longOption)
shortOption - short optionlongOption - long optionprotected OptDesc()
protected static List<Completers.OptDesc> compile(Map<String,List<String>> optionValues, Collection<String> options)
public void setValueCompleter(Completer valueCompleter)
public String longOption()
public String shortOption()
public String description()
protected boolean hasValue()
protected Completer valueCompleter()
protected void completeOption(LineReader reader, ParsedLine commandLine, List<Candidate> candidates, boolean longOpt)
protected boolean completeValue(LineReader reader, ParsedLine commandLine, List<Candidate> candidates, String curBuf, String partialValue)
protected boolean match(String option)
protected boolean startsWith(String option)
Copyright © 2020. All rights reserved.