Package com.github.dozermapper.core.util
Class BridgedMethodFinder
- java.lang.Object
-
- com.github.dozermapper.core.util.BridgedMethodFinder
-
public final class BridgedMethodFinder extends Object
Utility class to find methods that are bridged by other methods (bridge methods)
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static MethodfindMethod(Method bridgeMethod, Class<?> targetClass)Find the original method for the Java5 bridge Method.
-
-
-
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
-
-