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, parseprivate 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
IllegalParameterExceptionpublic int getArity()
public Object parse(List<String> values) throws SyntaxException
parse in class ParameterDescriptorSyntaxExceptionpublic void printUsage(Appendable writer) throws IOException
printUsage in class ParameterDescriptorwriter - the writer to print toIOException - any io exceptionCopyright © 2015 eXo Platform SAS. All Rights Reserved.