org.crsh.cmdline
Class OptionDescriptor<B extends TypeBinding>
java.lang.Object
org.crsh.cmdline.ParameterDescriptor<B>
org.crsh.cmdline.OptionDescriptor<B>
public class OptionDescriptor<B extends TypeBinding>
- extends ParameterDescriptor<B>
- Version:
- $Revision$
- Author:
- Julien Viet
Methods inherited from class org.crsh.cmdline.ParameterDescriptor |
getAnnotation, getBinding, getCompleterType, getDescription, getJavaType, getJavaValueType, getMultiplicity, getOwner, getType, getUsage, isMultiValued, isPassword, isRequired, isSingleValued, isUnquote, parse |
arity
private final int arity
- .
names
private final List<String> names
- .
OptionDescriptor
public OptionDescriptor(B binding,
Type javaType,
List<String> names,
Description info,
boolean required,
boolean password,
boolean unquote,
Class<? extends Completer> completerType,
Annotation annotation)
throws IllegalValueTypeException,
IllegalParameterException
- Throws:
IllegalValueTypeException
IllegalParameterException
getArity
public int getArity()
getNames
public List<String> getNames()
parse
public Object parse(List<String> values)
throws CmdSyntaxException
- Specified by:
parse
in class ParameterDescriptor<B extends TypeBinding>
- Throws:
CmdSyntaxException
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<B extends TypeBinding>
- Parameters:
writer
- the writer to print to
- Throws:
IOException
- any io exception
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2012 eXo Platform SAS. All Rights Reserved.