Package io.atlasmap.core
Class DefaultAtlasConversionService
java.lang.Object
io.atlasmap.core.DefaultAtlasConversionService
- All Implemented Interfaces:
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
-
getInstance
-
listPrimitiveClassNames
-
findMatchingConverter
- Specified by:
findMatchingConverter
in interfaceAtlasConversionService
-
findMatchingConverter
public Optional<AtlasConverter<?>> findMatchingConverter(String sourceClassName, String targetClassName) - Specified by:
findMatchingConverter
in interfaceAtlasConversionService
-
copyPrimitive
- Specified by:
copyPrimitive
in interfaceAtlasConversionService
-
convertType
public Object convertType(Object sourceValue, FieldType origSourceType, FieldType targetType) throws AtlasConversionException Description copied from interface:AtlasConversionService
Perform type conversion with specifyingFieldType
. This method focuses on conversion between different field types with using AtlasMap field type representative classes. UseAtlasConversionService.convertType(Object, String, Class, String)
to convert into specific Java class.- Specified by:
convertType
in interfaceAtlasConversionService
- Parameters:
sourceValue
- source value to convertorigSourceType
-FieldType
of source fieldtargetType
-FieldType
of target field- Returns:
- converted value
- Throws:
AtlasConversionException
- conversion failed- See Also:
-
convertType
public Object convertType(Object sourceValue, String sourceFormat, FieldType targetType, String targetFormat) throws AtlasConversionException Description copied from interface:AtlasConversionService
Perform type conversion with specifyingFieldType
. This method focuses on conversion between different field types with using AtlasMap field type representative classes. UseAtlasConversionService.convertType(Object, String, Class, String)
to convert into specific Java class.- Specified by:
convertType
in interfaceAtlasConversionService
- 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
public Object convertType(Object sourceValue, String sourceFormat, Class<?> targetType, String targetFormat) throws AtlasConversionException Description copied from interface:AtlasConversionService
- Specified by:
convertType
in interfaceAtlasConversionService
- 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
- Specified by:
isConvertionAvailableFor
in interfaceAtlasConversionService
-
isPrimitive
- Specified by:
isPrimitive
in interfaceAtlasConversionService
-
isPrimitive
- Specified by:
isPrimitive
in interfaceAtlasConversionService
-
isPrimitive
- Specified by:
isPrimitive
in interfaceAtlasConversionService
-
isBoxedPrimitive
- Specified by:
isBoxedPrimitive
in interfaceAtlasConversionService
-
boxOrUnboxPrimitive
- Specified by:
boxOrUnboxPrimitive
in interfaceAtlasConversionService
-
boxOrUnboxPrimitive
- Specified by:
boxOrUnboxPrimitive
in interfaceAtlasConversionService
-
fieldTypeFromClass
- Specified by:
fieldTypeFromClass
in interfaceAtlasConversionService
-
fieldTypeFromClass
- Specified by:
fieldTypeFromClass
in interfaceAtlasConversionService
-
classFromFieldType
- Specified by:
classFromFieldType
in interfaceAtlasConversionService
-
isAssignableFieldType
- Specified by:
isAssignableFieldType
in interfaceAtlasConversionService
-