org.polyforms.di.converter
Class SpringConverter

java.lang.Object
  extended by org.polyforms.di.converter.SpringConverter
All Implemented Interfaces:
org.modelmapper.Converter<Object,Object>, org.modelmapper.spi.ConditionalConverter<Object,Object>

@Named
public class SpringConverter
extends Object
implements org.modelmapper.spi.ConditionalConverter<Object,Object>

Adapter of Spring ConversionService for ModelMapper Converter.

Since:
1.0
Author:
Kuisong Tong

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.modelmapper.spi.ConditionalConverter
org.modelmapper.spi.ConditionalConverter.MatchResult
 
Constructor Summary
SpringConverter(javax.inject.Provider<org.springframework.core.convert.ConversionService> conversionServiceProvider)
          Create an instance with Spring ConversionService.
 
Method Summary
 Object convert(org.modelmapper.spi.MappingContext<Object,Object> context)
          
 org.modelmapper.spi.ConditionalConverter.MatchResult match(Class<?> sourceType, Class<?> destinationType)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpringConverter

@Inject
public SpringConverter(javax.inject.Provider<org.springframework.core.convert.ConversionService> conversionServiceProvider)
Create an instance with Spring ConversionService.

Method Detail

convert

public Object convert(org.modelmapper.spi.MappingContext<Object,Object> context)

Specified by:
convert in interface org.modelmapper.Converter<Object,Object>

match

public org.modelmapper.spi.ConditionalConverter.MatchResult match(Class<?> sourceType,
                                                                  Class<?> destinationType)

Specified by:
match in interface org.modelmapper.spi.ConditionalConverter<Object,Object>


Copyright © 2010-2011 Polyforms Framework. All Rights Reserved.