com.hammurapi.convert
Class ContextConverterFactory

java.lang.Object
  extended by com.hammurapi.convert.ContextConverterFactory

public class ContextConverterFactory
extends Object

Creates converters from Context and MutableContext to interfaces which have only setters and getters (beans)

Author:
Pavel

Constructor Summary
ContextConverterFactory()
           
 
Method Summary
static
<S,T> ConverterClosure<S,T>
getConverter(Class<S> sourceClass, Class<T> targetInterface)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContextConverterFactory

public ContextConverterFactory()
Method Detail

getConverter

public static <S,T> ConverterClosure<S,T> getConverter(Class<S> sourceClass,
                                                       Class<T> targetInterface)
Parameters:
sourceClass -
targetInterface -
Returns:
Converter which can "duck-type" instance of source class to target interface or null if conversion is not possible. Methods are mapped as follows: return types shall be compatible, arguments shall be compatible, exception declarations are ignored.