org.apache.commons.convert
Class MiscConverters.EnumToString
java.lang.Object
org.apache.commons.convert.AbstractConverter<Enum<?>,String>
org.apache.commons.convert.MiscConverters.EnumToString
- All Implemented Interfaces:
- Converter<Enum<?>,String>, ConverterLoader
- Enclosing class:
- MiscConverters
public static class MiscConverters.EnumToString
- extends AbstractConverter<Enum<?>,String>
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MiscConverters.EnumToString
public MiscConverters.EnumToString()
canConvert
public boolean canConvert(Class<?> sourceClass,
Class<?> targetClass)
- Description copied from interface:
Converter
- Returns
true
if this object can convert
sourceClass
to targetClass
.
Implementations can accomodate class hierarchy ranges
by converting super classes or interfaces.
- Specified by:
canConvert
in interface Converter<Enum<?>,String>
- Overrides:
canConvert
in class AbstractConverter<Enum<?>,String>
- Parameters:
sourceClass
- The source Class
targetClass
- The target Class
- Returns:
true
if this object can convert
sourceClass
to targetClass
.
convert
public String convert(Enum<?> obj)
throws ConversionException
- Description copied from interface:
Converter
- Converts
obj
to T
.
- Parameters:
obj
- The source Object
to convert
- Returns:
- The converted
Object
- Throws:
ConversionException
getSourceClass
public Class<? super Enum<?>> getSourceClass()
- Description copied from interface:
Converter
- Returns the source
Class
for this converter.
- Specified by:
getSourceClass
in interface Converter<Enum<?>,String>
- Overrides:
getSourceClass
in class AbstractConverter<Enum<?>,String>
- Returns:
- The source
Class
for this converter
Copyright © 2003-2013 The Apache Software Foundation. All Rights Reserved.