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


Field Summary
private  Annotation annotation
          The annotation when it exists.
private  Object binding
          .
private  Class<? extends Completer> completerType
          .
private  Description description
          .
private  boolean password
          .
private  boolean required
          .
private  ParameterType<?> type
          .
private  boolean unquote
          .
 
Constructor Summary
ParameterDescriptor(Object binding, ParameterType<?> type, Description description, boolean required, boolean password, boolean unquote, Class<? extends Completer> completerType, Annotation annotation)
           
 
Method Summary
 Annotation getAnnotation()
           
 Object getBinding()
           
 Class<? extends Completer> getCompleterType()
           
 Class<?> getDeclaredType()
           
 Description getDescription()
           
 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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

binding

private final Object binding
.


description

private final Description description
.


type

private final ParameterType<?> type
.


required

private final boolean required
.


password

private final boolean password
.


completerType

private final Class<? extends Completer> completerType
.


annotation

private final Annotation annotation
The annotation when it exists.


unquote

private final boolean unquote
.

Constructor Detail

ParameterDescriptor

public ParameterDescriptor(Object binding,
                           ParameterType<?> type,
                           Description description,
                           boolean required,
                           boolean password,
                           boolean unquote,
                           Class<? extends Completer> completerType,
                           Annotation annotation)
                    throws IllegalValueTypeException,
                           IllegalParameterException
Throws:
IllegalValueTypeException
IllegalParameterException
Method Detail

parse

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

parse

public abstract Object parse(List<String> values)
                      throws SyntaxException
Throws:
SyntaxException

getDeclaredType

public Class<?> getDeclaredType()

getBinding

public final Object getBinding()

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 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 © 2014 eXo Platform SAS. All Rights Reserved.