com.beust.jcommander
Class ParameterDescription

java.lang.Object
  extended by com.beust.jcommander.ParameterDescription

public class ParameterDescription
extends Object


Constructor Summary
ParameterDescription(Object object, DynamicParameter annotation, Parameterized parameterized, ResourceBundle bundle, JCommander jc)
           
ParameterDescription(Object object, Parameter annotation, Parameterized parameterized, ResourceBundle bundle, JCommander jc)
           
 
Method Summary
 void addValue(String value)
           
 void addValue(String value, boolean isDefault)
          Add the specified value to the field.
 Object getDefault()
           
 String getDescription()
           
 String getLongestName()
           
 String getNames()
           
 Object getObject()
           
 Parameterized getParameterized()
           
 boolean isAssigned()
           
 boolean isDynamicParameter()
           
 boolean isHelp()
           
 void setAssigned(boolean b)
           
 String toString()
           
static void validateParameter(Class<? extends IParameterValidator> validator, String name, String value)
           
static void validateValueParameter(Class<? extends IValueValidator> validator, String name, Object value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ParameterDescription

public ParameterDescription(Object object,
                            DynamicParameter annotation,
                            Parameterized parameterized,
                            ResourceBundle bundle,
                            JCommander jc)

ParameterDescription

public ParameterDescription(Object object,
                            Parameter annotation,
                            Parameterized parameterized,
                            ResourceBundle bundle,
                            JCommander jc)
Method Detail

getLongestName

public String getLongestName()

getDefault

public Object getDefault()

getDescription

public String getDescription()

getObject

public Object getObject()

getNames

public String getNames()

getParameterized

public Parameterized getParameterized()

addValue

public void addValue(String value)

isAssigned

public boolean isAssigned()
Returns:
true if this parameter received a value during the parsing phase.

setAssigned

public void setAssigned(boolean b)

addValue

public void addValue(String value,
                     boolean isDefault)
Add the specified value to the field. First, validate the value if a validator was specified. Then look up any field converter, then any type converter, and if we can't find any, throw an exception.


validateValueParameter

public static void validateValueParameter(Class<? extends IValueValidator> validator,
                                          String name,
                                          Object value)

validateParameter

public static void validateParameter(Class<? extends IParameterValidator> validator,
                                     String name,
                                     String value)

toString

public String toString()
Overrides:
toString in class Object

isDynamicParameter

public boolean isDynamicParameter()

isHelp

public boolean isHelp()


Copyright © 2012. All Rights Reserved.