org.polyforms.di.converter
Class ModelMapperConverter
java.lang.Object
org.polyforms.di.converter.ModelMapperConverter
- All Implemented Interfaces:
- org.springframework.core.convert.converter.ConditionalGenericConverter, org.springframework.core.convert.converter.GenericConverter
@Named
public class ModelMapperConverter
- extends Object
- implements org.springframework.core.convert.converter.ConditionalGenericConverter
Adapter of ModelMapper ModelMapper for Spring
GenericConverter.
- Since:
- 1.0
- Author:
- Kuisong Tong
| Nested classes/interfaces inherited from interface org.springframework.core.convert.converter.GenericConverter |
org.springframework.core.convert.converter.GenericConverter.ConvertiblePair |
|
Constructor Summary |
ModelMapperConverter(org.modelmapper.ModelMapper modelMapper)
Create an instance with ModelMapper. |
|
Method Summary |
Object |
convert(Object source,
org.springframework.core.convert.TypeDescriptor sourceType,
org.springframework.core.convert.TypeDescriptor targetType)
|
Set<org.springframework.core.convert.converter.GenericConverter.ConvertiblePair> |
getConvertibleTypes()
|
boolean |
matches(org.springframework.core.convert.TypeDescriptor sourceType,
org.springframework.core.convert.TypeDescriptor targetType)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ModelMapperConverter
@Inject
public ModelMapperConverter(org.modelmapper.ModelMapper modelMapper)
- Create an instance with
ModelMapper.
getConvertibleTypes
public Set<org.springframework.core.convert.converter.GenericConverter.ConvertiblePair> getConvertibleTypes()
-
- Specified by:
getConvertibleTypes in interface org.springframework.core.convert.converter.GenericConverter
matches
public boolean matches(org.springframework.core.convert.TypeDescriptor sourceType,
org.springframework.core.convert.TypeDescriptor targetType)
-
- Specified by:
matches in interface org.springframework.core.convert.converter.ConditionalGenericConverter
convert
public Object convert(Object source,
org.springframework.core.convert.TypeDescriptor sourceType,
org.springframework.core.convert.TypeDescriptor targetType)
-
- Specified by:
convert in interface org.springframework.core.convert.converter.GenericConverter
Copyright © 2010-2011 Polyforms Framework. All Rights Reserved.