org.specrunner.converters.core
Class ConverterEnumValue
java.lang.Object
org.specrunner.converters.core.ConverterNotNullNotEmpty
org.specrunner.converters.core.ConverterEnumValue
- All Implemented Interfaces:
- Serializable, IConverter, IResetable
- Direct Known Subclasses:
- ConverterEnumValueTemplate
public class ConverterEnumValue
- extends ConverterNotNullNotEmpty
Basic enumeration converter, from a text to the corresponding enumeration
item.
Three arguments are required:
- The enumeration class type, or enumeration class name;
- The method name to be used as reference for convertion, i.e. "name";
- The method name to be used as result, i.e. "ordinal";
- Author:
- Thiago Santos.
- See Also:
- Serialized Form
|
Method Summary |
Object |
convert(Object obj,
Object[] args)
Convert a given object to another using some arguments as auxiliary. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ConverterEnumValue
public ConverterEnumValue()
convert
public Object convert(Object obj,
Object[] args)
throws ConverterException
- Description copied from interface:
IConverter
- Convert a given object to another using some arguments as auxiliary.
- Specified by:
convert in interface IConverter- Overrides:
convert in class ConverterNotNullNotEmpty
- Parameters:
obj - The value to be converted.args - The arguments.
- Returns:
- The converted object.
- Throws:
ConverterException - On conversion errors.
Copyright © 2014. All rights reserved.