|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbiz.hammurapi.convert.DuckConverterFactory
public class DuckConverterFactory
Creates converters which use "duck" typing.
Constructor Summary | |
---|---|
DuckConverterFactory()
|
Method Summary | |
---|---|
static java.lang.Integer |
classAffinity(java.lang.Class subClass,
java.lang.Class superClass)
Calculates how close is subclass to superclass in class hierarchy. |
static boolean |
duckMap(java.lang.Class theInterface,
java.lang.Class theClass,
java.util.Map methodMap)
Duck maps source (interface methods) to compatible target (class) methods. |
static boolean |
duckMap(java.lang.reflect.Method[] interfaceMethods,
java.lang.reflect.Method[] classMethods,
java.util.Map methodMap)
Duck maps source (interface methods) to compatible target (class) methods. |
static java.lang.ClassLoader |
getChildClassLoader(java.lang.ClassLoader cl1,
java.lang.ClassLoader cl2)
|
static ConverterClosure |
getConverter(java.lang.Class sourceClass,
java.lang.Class targetInterface,
boolean lenient)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DuckConverterFactory()
Method Detail |
---|
public static ConverterClosure getConverter(java.lang.Class sourceClass, java.lang.Class targetInterface, boolean lenient)
sourceClass
- targetInterface
- lenient
- If true converter is created even not all interface methods could be mapped to class methods.
public static boolean duckMap(java.lang.Class theInterface, java.lang.Class theClass, java.util.Map methodMap)
interfaceMethods
- Interface methods.classMethods
- Class methodsmethodMap
- Method map (interface to class methods).
public static boolean duckMap(java.lang.reflect.Method[] interfaceMethods, java.lang.reflect.Method[] classMethods, java.util.Map methodMap)
interfaceMethods
- Interface methods.classMethods
- Class methodsmethodMap
- Method map (interface to class methods).
public static java.lang.Integer classAffinity(java.lang.Class subClass, java.lang.Class superClass)
subClass
- superClass
-
public static java.lang.ClassLoader getChildClassLoader(java.lang.ClassLoader cl1, java.lang.ClassLoader cl2)
cl1
- cl2
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |