ma.glasnost.orika.constructor
Class SimpleConstructorResolverStrategy

java.lang.Object
  extended by ma.glasnost.orika.constructor.SimpleConstructorResolverStrategy
All Implemented Interfaces:
ConstructorResolverStrategy

public class SimpleConstructorResolverStrategy
extends Object
implements ConstructorResolverStrategy

SimpleConstructorResolverStrategy attempts to resolve the appropriate constructor to use in a field mapping by the following algorithm:

  1. If an explicit constructor has been defined (based on parameter names), then use it
  2. Attempt to find a constructor which has parameter names matching all of the mapped property names of the destination class
  3. Return the first constructor in the list


Nested Class Summary
 
Nested classes/interfaces inherited from interface ma.glasnost.orika.constructor.ConstructorResolverStrategy
ConstructorResolverStrategy.ConstructorMapping<T>
 
Constructor Summary
SimpleConstructorResolverStrategy()
           
 
Method Summary
<T,A,B> ConstructorResolverStrategy.ConstructorMapping<T>
resolve(ClassMap<A,B> classMap, Type<T> sourceType)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleConstructorResolverStrategy

public SimpleConstructorResolverStrategy()
Method Detail

resolve

public <T,A,B> ConstructorResolverStrategy.ConstructorMapping<T> resolve(ClassMap<A,B> classMap,
                                                                         Type<T> sourceType)
Specified by:
resolve in interface ConstructorResolverStrategy


Copyright © 2013 Glasnost. All Rights Reserved.