org.modelmapper.internal
Class MappingEngineImpl

java.lang.Object
  extended by org.modelmapper.internal.MappingEngineImpl
All Implemented Interfaces:
MappingEngine

public class MappingEngineImpl
extends Object
implements MappingEngine

MappingEngine implementation that caches ConditionalConverters by source and destination type pairs.

Author:
Jonathan Halterman

Constructor Summary
MappingEngineImpl(InheritingConfiguration configuration)
           
 
Method Summary
<S,D> D
createDestination(MappingContext<S,D> context)
          Creates an instance of the destination type for the context, capturing any errors that may occur during instantiation.
<S,D> D
map(MappingContext<S,D> context)
          Performs mapping using a TypeMap if one exists, else a converter if one applies, else a newly created TypeMap.
<S,D> D
map(S source, Class<S> sourceType, D destination, Class<D> destinationType)
          Initial entry point.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MappingEngineImpl

public MappingEngineImpl(InheritingConfiguration configuration)
Method Detail

map

public <S,D> D map(S source,
                   Class<S> sourceType,
                   D destination,
                   Class<D> destinationType)
Initial entry point.


map

public <S,D> D map(MappingContext<S,D> context)
Performs mapping using a TypeMap if one exists, else a converter if one applies, else a newly created TypeMap. Recursive entry point.

Specified by:
map in interface MappingEngine
Type Parameters:
S - source type
D - destination type
Parameters:
context - to map for
Returns:
fully mapped instance of D

createDestination

public <S,D> D createDestination(MappingContext<S,D> context)
Description copied from interface: MappingEngine
Creates an instance of the destination type for the context, capturing any errors that may occur during instantiation.

Specified by:
createDestination in interface MappingEngine


Copyright © 2011. All Rights Reserved.