This abstracts away the difference between a field and a setter method, which object we are setting the value to, and/or how we handle collection fields differently.
Getter
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public AnnotatedElement | asAnnotatedElement()
Returns the |
| public FieldSetter | Returns: null if this setter wraps a method.If this setter encapsulates a field, return the direct access to that field as
|
| public Class | |
| public boolean |
| addValue | back to summary |
|---|---|
| public void addValue(T value) throws CmdLineException Adds/sets a value to the property of the option bean.
A | |
| asAnnotatedElement | back to summary |
|---|---|
| public AnnotatedElement asAnnotatedElement() Returns the
This enables | |
| asFieldSetter | back to summary |
|---|---|
| public FieldSetter asFieldSetter() If this setter encapsulates a field, return the direct access to that field as
| |
| getType | back to summary |
|---|---|
| public Class Gets the type of the underlying method/field. | |
| isMultiValued | back to summary |
|---|---|
| public boolean isMultiValued() Whether this setter is intrinsically multi-valued.
When parsing arguments (instead of options), intrinsically multi-valued setters consume
all the remaining arguments. So, if the setter can store multiple values,
this method should return This characteristics of a setter doesn't affect option parsing at all; any options can be specified multiple times. In many cases, this is a no-op--but when your shell script expands multiple environment variables (each of which may contain options), tolerating such redundant options can be useful. | |