Package io.atlasmap.spi
Interface AtlasConversionService
- All Known Implementing Classes:
DefaultAtlasConversionService
public interface AtlasConversionService
-
Method Summary
Modifier and TypeMethodDescriptionClass<?>
boxOrUnboxPrimitive
(Class<?> clazz) Class<?>
boxOrUnboxPrimitive
(String clazzName) Class<?>
classFromFieldType
(FieldType fieldType) convertType
(Object sourceValue, FieldType origSourceType, FieldType targetType) Perform type conversion with specifyingFieldType
.convertType
(Object sourceValue, String sourceFormat, FieldType targetType, String targetFormat) Perform type conversion with specifyingFieldType
.convertType
(Object sourceValue, String sourceFormat, Class<?> targetType, String targetFormat) copyPrimitive
(Object sourceValue) fieldTypeFromClass
(Class<?> clazz) fieldTypeFromClass
(String className) findMatchingConverter
(FieldType source, FieldType target) findMatchingConverter
(String sourceClassName, String targetClassName) isAssignableFieldType
(FieldType source, FieldType target) isBoxedPrimitive
(Class<?> clazz) boolean
isConvertionAvailableFor
(Object sourceValue, Class<?> targetType) isPrimitive
(FieldType fieldType) isPrimitive
(Class<?> clazz) isPrimitive
(String className)
-
Method Details
-
findMatchingConverter
-
findMatchingConverter
-
copyPrimitive
-
convertType
Object convertType(Object sourceValue, FieldType origSourceType, FieldType targetType) throws AtlasConversionException Perform type conversion with specifyingFieldType
. This method focuses on conversion between different field types with using AtlasMap field type representative classes. UseconvertType(Object, String, Class, String)
to convert into specific Java class.- Parameters:
sourceValue
- source value to convertorigSourceType
-FieldType
of source fieldtargetType
-FieldType
of target field- Returns:
- converted value
- Throws:
AtlasConversionException
- conversion failed- See Also:
-
convertType
Object convertType(Object sourceValue, String sourceFormat, FieldType targetType, String targetFormat) throws AtlasConversionException Perform type conversion with specifyingFieldType
. This method focuses on conversion between different field types with using AtlasMap field type representative classes. UseconvertType(Object, String, Class, String)
to convert into specific Java class.- Parameters:
sourceValue
- source value to convertsourceFormat
- source value formattargetType
-FieldType
of target fieldtargetFormat
- target value format- Returns:
- converted value
- Throws:
AtlasConversionException
- conversion failed- See Also:
-
convertType
Object convertType(Object sourceValue, String sourceFormat, Class<?> targetType, String targetFormat) throws AtlasConversionException - Parameters:
sourceValue
- source value to convertsourceFormat
- source value formattargetType
-Class
of target valuetargetFormat
- target value format- Returns:
- converted value
- Throws:
AtlasConversionException
- conversion failed- See Also:
-
isConvertionAvailableFor
-
boxOrUnboxPrimitive
-
boxOrUnboxPrimitive
-
classFromFieldType
-
fieldTypeFromClass
-
fieldTypeFromClass
-
isPrimitive
-
isPrimitive
-
isPrimitive
-
isBoxedPrimitive
-
isAssignableFieldType
-