Package com.beust.jcommander
Class ParameterDescription
java.lang.Object
com.beust.jcommander.ParameterDescription
-
Constructor Summary
ConstructorDescriptionParameterDescription
(Object object, DynamicParameter annotation, Parameterized parameterized, ResourceBundle bundle, JCommander jc) ParameterDescription
(Object object, Parameter annotation, Parameterized parameterized, ResourceBundle bundle, JCommander jc) -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
Add the specified value to the field.getNames()
boolean
boolean
boolean
isHelp()
boolean
void
setAssigned
(boolean b) toString()
void
validateParameter
(Class<? extends IParameterValidator> validator, String name, String value) void
validateValueParameter
(Class<? extends IValueValidator> validator, String name, Object value)
-
Constructor Details
-
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 Details
-
getLongestName
-
getDefault
-
getDefaultValueDescription
- Returns:
- defaultValueDescription, if description is empty string, return default Object.
-
getDescription
-
getObject
-
getNames
-
getCategory
-
getParameter
-
getParameterized
-
addValue
-
isAssigned
public boolean isAssigned()- Returns:
- true if this parameter received a value during the parsing phase.
-
setAssigned
public void setAssigned(boolean b) -
addValue
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. -
getParameterAnnotation
-
validateValueParameter
public void validateValueParameter(Class<? extends IValueValidator> validator, String name, Object value) -
validateParameter
public void validateParameter(Class<? extends IParameterValidator> validator, String name, String value) -
toString
-
isDynamicParameter
public boolean isDynamicParameter() -
isHelp
public boolean isHelp() -
isNonOverwritableForced
public boolean isNonOverwritableForced()
-