org.dozer.util
Class BridgedMethodFinder

java.lang.Object
  extended by org.dozer.util.BridgedMethodFinder

public final class BridgedMethodFinder
extends Object

Utility class to find methods that are bridged by other methods (bridge methods)

Author:
andor.greissl

Method Summary
static Method findMethod(Method bridgeMethod, Class<?> targetClass)
          Find the original method for the Java5 bridge Method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

findMethod

public static Method findMethod(Method bridgeMethod,
                                Class<?> targetClass)
Find the original method for the Java5 bridge Method. If the supplied method is not a bridge method then the supplied method is returned. If the supplied method is a bridge method, the algorithm tries to find a more specific method with parameters and return types that can be assigned to the the supplied method parameters and return type. Informally, method A is more specific than method B if any invocation handled by method A can also be handled by method B.

Parameters:
bridgeMethod - the bridge method (Java 5 specific)
targetClass - the class the method belongs to
Returns:
the original method or a more specific method if available


Copyright © 2005-2011 dozer. All Rights Reserved.