org.crsh.cli.descriptor
Class OptionDescriptor
java.lang.Object
org.crsh.cli.descriptor.ParameterDescriptor
org.crsh.cli.descriptor.OptionDescriptor
public class OptionDescriptor
- extends ParameterDescriptor
| Methods inherited from class org.crsh.cli.descriptor.ParameterDescriptor |
getAnnotation, getCompleterType, getDeclaredType, getDescription, getMultiplicity, getType, getUsage, isMultiValued, isPassword, isRequired, isSingleValued, isUnquote, parse |
OptionDescriptor
public 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
- Throws:
org.crsh.cli.impl.descriptor.IllegalValueTypeException
org.crsh.cli.impl.descriptor.IllegalParameterException
getArity
public int getArity()
getNames
public List<String> getNames()
parse
public Object parse(List<String> values)
throws org.crsh.cli.impl.SyntaxException
- Specified by:
parse in class ParameterDescriptor
- Throws:
org.crsh.cli.impl.SyntaxException
printUsage
public void printUsage(Appendable writer)
throws IOException
- Prints the option names as an alternative of switches surrounded by a square brace,
for instance: "[-f --foo]"
- Specified by:
printUsage in class ParameterDescriptor
- Parameters:
writer - the writer to print to
- Throws:
IOException - any io exception
toString
public String toString()
- Overrides:
toString in class Object
Copyright © 2015 eXo Platform SAS. All Rights Reserved.