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) booleanisConvertionAvailableFor(Object sourceValue, Class<?> targetType) isPrimitive(FieldType fieldType) isPrimitive(Class<?> clazz) isPrimitive(String className)
-
Method Details
-
getInstance
-
listPrimitiveClassNames
-
findMatchingConverter
- Specified by:
findMatchingConverterin interfaceAtlasConversionService
-
findMatchingConverter
public Optional<AtlasConverter<?>> findMatchingConverter(String sourceClassName, String targetClassName) - Specified by:
findMatchingConverterin interfaceAtlasConversionService
-
copyPrimitive
- Specified by:
copyPrimitivein interfaceAtlasConversionService
-
convertType
public Object convertType(Object sourceValue, FieldType origSourceType, FieldType targetType) throws AtlasConversionException Description copied from interface:AtlasConversionServicePerform 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:
convertTypein interfaceAtlasConversionService- Parameters:
sourceValue- source value to convertorigSourceType-FieldTypeof source fieldtargetType-FieldTypeof 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:AtlasConversionServicePerform 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:
convertTypein interfaceAtlasConversionService- Parameters:
sourceValue- source value to convertsourceFormat- source value formattargetType-FieldTypeof 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:
convertTypein interfaceAtlasConversionService- Parameters:
sourceValue- source value to convertsourceFormat- source value formattargetType-Classof target valuetargetFormat- target value format- Returns:
- converted value
- Throws:
AtlasConversionException- conversion failed- See Also:
-
isConvertionAvailableFor
- Specified by:
isConvertionAvailableForin interfaceAtlasConversionService
-
isPrimitive
- Specified by:
isPrimitivein interfaceAtlasConversionService
-
isPrimitive
- Specified by:
isPrimitivein interfaceAtlasConversionService
-
isPrimitive
- Specified by:
isPrimitivein interfaceAtlasConversionService
-
isBoxedPrimitive
- Specified by:
isBoxedPrimitivein interfaceAtlasConversionService
-
boxOrUnboxPrimitive
- Specified by:
boxOrUnboxPrimitivein interfaceAtlasConversionService
-
boxOrUnboxPrimitive
- Specified by:
boxOrUnboxPrimitivein interfaceAtlasConversionService
-
fieldTypeFromClass
- Specified by:
fieldTypeFromClassin interfaceAtlasConversionService
-
fieldTypeFromClass
- Specified by:
fieldTypeFromClassin interfaceAtlasConversionService
-
classFromFieldType
- Specified by:
classFromFieldTypein interfaceAtlasConversionService
-
isAssignableFieldType
- Specified by:
isAssignableFieldTypein interfaceAtlasConversionService
-