mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-21 13:31:46 +00:00
addNestedMapper
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@2070 50f2f4bb-b051-0410-bef5-90022cba6387
This commit is contained in:
+10
@@ -115,6 +115,16 @@ public class SpelMapper implements Mapper<Object, Object> {
|
||||
return mapping;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a Mapper to apply to complex nested property mappings of a specific sourceType/targetType pair.
|
||||
* @param sourceType the source nested property type
|
||||
* @param targetType the target nested property type
|
||||
* @param nestedMapper the nested mapper
|
||||
*/
|
||||
public void addNestedMapper(Class sourceType, Class targetType, Mapper<?, ?> nestedMapper) {
|
||||
this.conversionService.addGenericConverter(sourceType, targetType, new MapperConverter(nestedMapper));
|
||||
}
|
||||
|
||||
/**
|
||||
* Return this mapper's converter registry.
|
||||
* Allows for registration of simple type converters as well as converters that map nested objects using a Mapper.
|
||||
|
||||
Reference in New Issue
Block a user