01: package org.kohsuke.args4j.spi;
02:
03: import org.kohsuke.args4j.CmdLineException;
04:
05: /**
06: * Abstraction of the value setter.
07: *
08: * @author Kohsuke Kawaguchi
09: */
10: public interface Setter<T> {
11: /**
12: * Adds/sets a value to the property of the option bean.
13: *
14: * <p>
15: * A {@link Setter} object has an implicit knowledge about the property it's setting,
16: * and the instance of the option bean.
17: */
18: void addValue(T value) throws CmdLineException;
19:
20: /**
21: * Gets the type of the underlying method/field.
22: */
23: Class<T> getType();
24:
25: /**
26: * Whether this setter is instrinsically multi-valued.
27: */
28: boolean isMultiValued();
29: }
|