Top Fields Constructors Methods
joptsimple.internal

pack-priv Class ConstructorInvokingValueConverter<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.Constructor, joptsimple.ValueConverter

Author
Paul Holser

Field Summary

Modifier and TypeField and Description
private final Constructor<V>

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

ctorback to summary
private final Constructor<V> ctor

Constructor Detail

ConstructorInvokingValueConverterback to summary
pack-priv ConstructorInvokingValueConverter(Constructor<V> ctor)

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