| java.lang.Object biz.hammurapi.convert.DuckConverterFactory
DuckConverterFactory | public class DuckConverterFactory (Code) | | Creates converters which use "duck" typing.
author: Pavel |
classAffinity | public static int classAffinity(Class subClass, Class superClass)(Code) | | Calculates how close is subclass to superclass in class hierarchy.
Parameters: subClass - Parameters: superClass - affinity, or Integer.MAX_VALUE if classes don't belong to the same class hierarchy. |
getConverter | public static Converter getConverter(Class sourceClass, Class targetInterface)(Code) | | Parameters: sourceClass - Parameters: targetInterface - 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. |
|
|