summaryrefslogtreecommitdiff
path: root/src/main/java/com/beust/jcommander/IStringConverterInstanceFactory.java
blob: 1a87b5bd6e35d7970000650bf64f6d4020dbd450 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
package com.beust.jcommander;

/**
 * A factory to create {@link IStringConverter} instances.
 *
 * This interface lets you specify your converters in one place instead of having them repeated all over your argument classes.
 *
 * @author simon04
 * @see IStringConverterFactory
 */
public interface IStringConverterInstanceFactory {
    /**
     * Obtain a converter instance for parsing {@code parameter} as type {@code forType}
     * @param parameter the parameter to parse
     * @param forType the type class
     * @param optionName the name of the option used on the command line
     * @return a converter instance
     */
    IStringConverter<?> getConverterInstance(Parameter parameter, Class<?> forType, String optionName);
}