Package eu.woolplatform.utils.xml
Class EnumValueParser<T extends Enum<T>>
- java.lang.Object
-
- eu.woolplatform.utils.xml.EnumValueParser<T>
-
- Type Parameters:
T- the enum type
- All Implemented Interfaces:
XMLValueParser<T>
public class EnumValueParser<T extends Enum<T>> extends Object implements XMLValueParser<T>
Value parser for enum values. It performs a case-insensitive search of a value in a specified enum class.
-
-
Constructor Summary
Constructors Constructor Description EnumValueParser(Class<T> enumClass)Constructs a new parser.
-
-
-
Method Detail
-
parse
public T parse(String xml) throws ParseException
Description copied from interface:XMLValueParserParses the specified string value.- Specified by:
parsein interfaceXMLValueParser<T extends Enum<T>>- Parameters:
xml- the string value- Returns:
- the Java object
- Throws:
ParseException- if the string value is invalid
-
-