Top Description Fields Constructors Methods
com.beust.jcommander.converters

public Class EnumConverter<T extends Enum<T>>

extends Object
implements IStringConverter<T extends Enum<T>>
Class Inheritance
All Implemented Interfaces
com.beust.jcommander.IStringConverter
Type Parameters
<T>
the enum type
Imports
com.beust.jcommander.IStringConverter, .ParameterException, java.util.EnumSet

A converter to parse enums
Author
simon04

Field Summary

Modifier and TypeField and Description
private final Class<T>
private final String

Constructor Summary

AccessConstructor and Description
public
EnumConverter(String
the option name for error reporting
optionName
,
Class<T>
the enum class
clazz
)

Constructs a new converter.

Method Summary

Modifier and TypeMethod and Description
public T
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

clazzback to summary
private final Class<T> clazz
optionNameback to summary
private final String optionName

Constructor Detail

EnumConverterback to summary
public EnumConverter(String optionName, Class<T> clazz)

Constructs a new converter.

Parameters
optionName:String

the option name for error reporting

clazz:Class<T>

the enum class

Method Detail

convertback to summary
public T convert(String value)

Implements com.beust.jcommander.IStringConverter.convert.

Returns:T

Doc from com.beust.jcommander.IStringConverter.convert.

an object of type T created from the parameter value.

Annotations
@Override