public static Method findBridgedMethod(Method bridgeMethod) {
		if (bridgeMethod == null || !bridgeMethod.isBridge()) {
			return bridgeMethod;
		}
		// Gather all methods with matching name and parameter size.
		List<Method> candidateMethods = new ArrayList<Method>();
		Method[] methods = ReflectionUtils.getAllDeclaredMethods(bridgeMethod.getDeclaringClass());
		for (Method candidateMethod : methods) {
			if (isBridgedCandidateFor(candidateMethod, bridgeMethod)) {
				candidateMethods.add(candidateMethod);
			}
		}
		// Now perform simple quick check.
		if (candidateMethods.size() == 1) {
			return candidateMethods.get(0);
		}
		// Search for candidate match.
		Method bridgedMethod = searchCandidates(candidateMethods, bridgeMethod);
		if (bridgedMethod != null) {
			// Bridged method found...
			return bridgedMethod;
		}
		else {
			// A bridge method was passed in but we couldn't find the bridged method.
			// Let's proceed with the passed-in method and hope for the best...
			return bridgeMethod;
		}
	}
public static Method findBridgedMethod ( Method bridgeMethod ) { if ( bridgeMethod == null || ! bridgeMethod . isBridge ( ) ) { return bridgeMethod ; } List < Method > candidateMethods = new ArrayList < Method > ( ) ; Method [ ] methods = ReflectionUtils . getAllDeclaredMethods ( bridgeMethod . getDeclaringClass ( ) ) ; for ( Method candidateMethod : methods ) { if ( isBridgedCandidateFor ( candidateMethod , bridgeMethod ) ) { candidateMethods . add ( candidateMethod ) ; } } if ( candidateMethods . size ( ) == 1 ) { return candidateMethods . get ( 0 ) ; } Method bridgedMethod = searchCandidates ( candidateMethods , bridgeMethod ) ; if ( bridgedMethod != null ) { return bridgedMethod ; } else { return bridgeMethod ; } }
Find the original method for the supplied {@link Method bridge Method}.
<p>It is safe to call this method passing in a non-bridge {@link Method} instance.
In such a case, the supplied {@link Method} instance is returned directly to the caller.
Callers are <strong>not</strong> required to check for bridging before calling this method.
@param bridgeMethod the method to introspect
@return the original method (either the bridged method or the passed-in method
if no more specific one could be found)