public class OptionDescriptor extends ParameterDescriptor
| Constructor and Description |
|---|
OptionDescriptor(org.crsh.cli.impl.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 |
|---|---|
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, parsepublic OptionDescriptor(org.crsh.cli.impl.ParameterType<?> type,
List<String> names,
Description info,
boolean required,
boolean password,
boolean unquote,
Class<? extends Completer> completerType,
Annotation annotation)
throws org.crsh.cli.impl.descriptor.IllegalValueTypeException,
org.crsh.cli.impl.descriptor.IllegalParameterException
org.crsh.cli.impl.descriptor.IllegalValueTypeExceptionorg.crsh.cli.impl.descriptor.IllegalParameterExceptionpublic int getArity()
public Object parse(List<String> values) throws org.crsh.cli.impl.SyntaxException
parse in class ParameterDescriptororg.crsh.cli.impl.SyntaxExceptionpublic 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.