org.crsh.cmdline
Class ParameterDescriptor<B extends TypeBinding>

java.lang.Object
  extended by org.crsh.cmdline.ParameterDescriptor<B>
Direct Known Subclasses:
ArgumentDescriptor, OptionDescriptor

public abstract class ParameterDescriptor<B extends TypeBinding>
extends Object

Version:
$Revision$
Author:
Julien Viet

Field Summary
private  Annotation annotation
          The annotation when it exists.
private  B binding
          .
private  Class<? extends Completer> completerType
          .
private  Description description
          .
private  Type javaType
          .
private  Class<?> javaValueType
          .
private  Multiplicity multiplicity
          .
(package private)  CommandDescriptor<?,B> owner
          .
private  boolean password
          .
private  boolean required
          .
private  SimpleValueType type
          .
private  boolean unquote
          .
 
Constructor Summary
ParameterDescriptor(B binding, Type javaType, Description description, boolean required, boolean password, boolean unquote, Class<? extends Completer> completerType, Annotation annotation)
           
 
Method Summary
 Annotation getAnnotation()
           
 B getBinding()
           
 Class<? extends Completer> getCompleterType()
           
 Description getDescription()
           
 Type getJavaType()
           
 Class<?> getJavaValueType()
           
 Multiplicity getMultiplicity()
           
 CommandDescriptor<?,B> getOwner()
           
 SimpleValueType 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 B extends TypeBinding binding
.


description

private final Description description
.


type

private final SimpleValueType type
.


multiplicity

private final Multiplicity multiplicity
.


required

private final boolean required
.


password

private final boolean password
.


javaType

private final Type javaType
.


javaValueType

private final Class<?> javaValueType
.


completerType

private final Class<? extends Completer> completerType
.


annotation

private final Annotation annotation
The annotation when it exists.


unquote

private final boolean unquote
.


owner

CommandDescriptor<?,B extends TypeBinding> owner
.

Constructor Detail

ParameterDescriptor

public ParameterDescriptor(B binding,
                           Type javaType,
                           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 CmdSyntaxException
Throws:
CmdSyntaxException

getOwner

public CommandDescriptor<?,B> getOwner()

getJavaType

public Type getJavaType()

getJavaValueType

public Class<?> getJavaValueType()

getBinding

public final B 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 SimpleValueType 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 © 2012 eXo Platform SAS. All Rights Reserved.