Package org.apache.ofbiz.base.conversion
Class MiscConverters.EnumToString
java.lang.Object
org.apache.ofbiz.base.conversion.AbstractConverter<Enum<?>,String>
org.apache.ofbiz.base.conversion.MiscConverters.EnumToString
- All Implemented Interfaces:
Converter<Enum<?>,
,String> ConverterLoader
- Enclosing class:
- MiscConverters
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
canConvert
(Class<?> sourceClass, Class<?> targetClass) Returnstrue
if this object can convertsourceClass
totargetClass
.Convertsobj
toT
.Convertsobj
toT
.Returns the sourceClass
for this converter.Methods inherited from class org.apache.ofbiz.base.conversion.AbstractConverter
getTargetClass, loadConverters
-
Constructor Details
-
EnumToString
public EnumToString()
-
-
Method Details
-
canConvert
Description copied from interface:Converter
Returnstrue
if this object can convertsourceClass
totargetClass
.Implementations can accomodate class hierarchy ranges by converting super classes or interfaces.
- Specified by:
canConvert
in interfaceConverter<Enum<?>,
String> - Overrides:
canConvert
in classAbstractConverter<Enum<?>,
String> - Parameters:
sourceClass
- The sourceClass
targetClass
- The targetClass
- Returns:
true
if this object can convertsourceClass
totargetClass
.
-
convert
Description copied from interface:Converter
Convertsobj
toT
.- Parameters:
obj
- The sourceObject
to convert- Returns:
- The converted
Object
- Throws:
ConversionException
-
convert
Description copied from interface:Converter
Convertsobj
toT
.- Specified by:
convert
in interfaceConverter<Enum<?>,
String> - Overrides:
convert
in classAbstractConverter<Enum<?>,
String> - Parameters:
targetClass
- TheClass
to convert toobj
- The sourceObject
to convert- Returns:
- The converted
Object
- Throws:
ConversionException
-
getSourceClass
Description copied from interface:Converter
Returns the sourceClass
for this converter.- Specified by:
getSourceClass
in interfaceConverter<Enum<?>,
String> - Overrides:
getSourceClass
in classAbstractConverter<Enum<?>,
String> - Returns:
- The source
Class
for this converter
-