001package org.kohsuke.args4j.spi; 002import java.util.List; 003 004import org.kohsuke.args4j.CmdLineException; 005import org.openimaj.util.pair.IndependentPair; 006 007/** 008 * Abstraction of the value setter. 009 * 010 * @author Kohsuke Kawaguchi 011 * @param <T> the type returned 012 */ 013public interface Getter<T> { 014 /** 015 * A {@link Getter} object has an implicit knowledge about the property it's setting, 016 * and the instance of the option bean. 017 * 018 * @return Get all values to the property of the option bean. 019 * @throws CmdLineException 020 */ 021 List<IndependentPair<String, Class<?>>> getStringValues() throws CmdLineException; 022 023 /** 024 * @return Gets the type of the underlying method/field. 025 */ 026 Class<?> getType(); 027 028 /** 029 * @return Whether this setter is instrinsically multi-valued. 030 */ 031 boolean isMultiValued(); 032 033 /** 034 * @return The option name 035 */ 036 public String getOptionName(); 037}