Top Fields Constructors Methods
joptsimple.internal

pack-priv Class MethodInvokingValueConverter<V>

extends Object
implements ValueConverter<V>
Class Inheritance
All Implemented Interfaces
joptsimple.ValueConverter
Type Parameters
<V>
constraint on the type of values being converted to
Imports
java.lang.reflect.Method, joptsimple.ValueConverter

Author
Paul Holser

Field Summary

Modifier and TypeField and Description
private final Class<V>
private final Method

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public V
convert(String
the string to convert
value
)

Implements joptsimple.ValueConverter.convert.

Converts the given string value into a Java type.
public String
valuePattern()

Implements joptsimple.ValueConverter.valuePattern.

Gives a string that describes the pattern of the values this converter expects, if any.
public Class<V>
valueType()

Implements joptsimple.ValueConverter.valueType.

Gives the class of the type of values this converter converts to.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

clazzback to summary
private final Class<V> clazz
methodback to summary
private final Method method

Constructor Detail

MethodInvokingValueConverterback to summary
pack-priv MethodInvokingValueConverter(Method method, Class<V> clazz)

Method Detail

convertback to summary
public V convert(String value)

Implements joptsimple.ValueConverter.convert.

Doc from joptsimple.ValueConverter.convert.

Converts the given string value into a Java type.

Parameters
value:String

the string to convert

Returns:V

the converted value

valuePatternback to summary
public String valuePattern()

Implements joptsimple.ValueConverter.valuePattern.

Doc from joptsimple.ValueConverter.valuePattern.

Gives a string that describes the pattern of the values this converter expects, if any. For example, a date converter can respond with a date format string.

Returns:String

a value pattern, or null if there's nothing interesting here

valueTypeback to summary
public Class<V> valueType()

Implements joptsimple.ValueConverter.valueType.

Doc from joptsimple.ValueConverter.valueType.

Gives the class of the type of values this converter converts to.

Returns:Class<V>

the target class for conversion