public class OptionDescriptor extends ParameterDescriptor
Modifier and Type | Field and Description |
---|---|
private static BitSet |
A
.
|
private int |
arity
.
|
private static BitSet |
B
.
|
private List<String> |
names
.
|
Constructor and Description |
---|
OptionDescriptor(ParameterType<?> type,
List<String> names,
Description info,
boolean required,
boolean password,
boolean unquote,
Class<? extends Completer> completerType,
Annotation annotation) |
Modifier and Type | Method and Description |
---|---|
private static void |
checkChar(String s,
int index,
BitSet authorized) |
int |
getArity() |
List<String> |
getNames() |
Object |
parse(List<String> values) |
void |
printUsage(Appendable writer)
Prints the option names as an alternative of switches surrounded by a square brace,
for instance: "[-f --foo]"
|
String |
toString() |
getAnnotation, getCompleterType, getDeclaredType, getDescription, getMultiplicity, getType, getUsage, isMultiValued, isPassword, isRequired, isSingleValued, isUnquote, parse
private final int arity
public OptionDescriptor(ParameterType<?> type, List<String> names, Description info, boolean required, boolean password, boolean unquote, Class<? extends Completer> completerType, Annotation annotation) throws IllegalValueTypeException, IllegalParameterException
private static void checkChar(String s, int index, BitSet authorized) throws IllegalParameterException
IllegalParameterException
public int getArity()
public Object parse(List<String> values) throws SyntaxException
parse
in class ParameterDescriptor
SyntaxException
public void printUsage(Appendable writer) throws IOException
printUsage
in class ParameterDescriptor
writer
- the writer to print toIOException
- any io exceptionCopyright © 2015 eXo Platform SAS. All Rights Reserved.