org.crsh.cli.descriptor
Class ParameterDescriptor

java.lang.Object
  extended by org.crsh.cli.descriptor.ParameterDescriptor
Direct Known Subclasses:
ArgumentDescriptor, OptionDescriptor

public abstract class ParameterDescriptor
extends Object


Constructor Summary
ParameterDescriptor(org.crsh.cli.impl.ParameterType<?> type, Description description, boolean required, boolean password, boolean unquote, Class<? extends Completer> completerType, Annotation annotation)
           
 
Method Summary
 Annotation getAnnotation()
           
 Class<? extends Completer> getCompleterType()
           
 Class<?> getDeclaredType()
           
 Description getDescription()
           
 org.crsh.cli.impl.Multiplicity getMultiplicity()
           
 ValueType getType()
           
 String getUsage()
           
 boolean isMultiValued()
           
 boolean isPassword()
           
 boolean isRequired()
           
 boolean isSingleValued()
           
 boolean isUnquote()
           
abstract  Object parse(List<String> values)
           
 Object parse(String s)
           
abstract  void printUsage(Appendable writer)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParameterDescriptor

public ParameterDescriptor(org.crsh.cli.impl.ParameterType<?> type,
                           Description description,
                           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
Method Detail

parse

public Object parse(String s)
             throws Exception
Throws:
Exception

parse

public abstract Object parse(List<String> values)
                      throws org.crsh.cli.impl.SyntaxException
Throws:
org.crsh.cli.impl.SyntaxException

getDeclaredType

public Class<?> getDeclaredType()

getUsage

public final String getUsage()

getDescription

public Description getDescription()

getAnnotation

public Annotation getAnnotation()

isRequired

public final boolean isRequired()

isUnquote

public boolean isUnquote()

isPassword

public final boolean isPassword()

getType

public final ValueType getType()

getMultiplicity

public final org.crsh.cli.impl.Multiplicity getMultiplicity()

isSingleValued

public final boolean isSingleValued()

isMultiValued

public final boolean isMultiValued()

getCompleterType

public final Class<? extends Completer> getCompleterType()

printUsage

public abstract void printUsage(Appendable writer)
                         throws IOException
Throws:
IOException


Copyright © 2015 eXo Platform SAS. All Rights Reserved.