public static boolean isCompatible(Method method, Method intfMethod) {
    """
	See if the two methods are compatible, that is they have the same
	relative signature
	
	@param method
	@param intfMethod
	@return
    """
        if (method == intfMethod)
            return true;

        if (!method.getName().equals(intfMethod.getName()))
            return false;
        if (method.getParameterTypes().length != intfMethod.getParameterTypes().length)
            return false;

        for (int i = 0; i < method.getParameterTypes().length; i++) {
            Class rootParam = method.getParameterTypes()[i];
            Class intfParam = intfMethod.getParameterTypes()[i];
            if (!intfParam.isAssignableFrom(rootParam))
                return false;
        }
        return true;
    }
public static boolean isCompatible(Method method, Method intfMethod) {
        if (method == intfMethod)
            return true;

        if (!method.getName().equals(intfMethod.getName()))
            return false;
        if (method.getParameterTypes().length != intfMethod.getParameterTypes().length)
            return false;

        for (int i = 0; i < method.getParameterTypes().length; i++) {
            Class rootParam = method.getParameterTypes()[i];
            Class intfParam = intfMethod.getParameterTypes()[i];
            if (!intfParam.isAssignableFrom(rootParam))
                return false;
        }
        return true;
    }
public static boolean isCompatible ( Method method , Method intfMethod ) { if ( method == intfMethod ) return true ; if ( ! method . getName ( ) . equals ( intfMethod . getName ( ) ) ) return false ; if ( method . getParameterTypes ( ) . length != intfMethod . getParameterTypes ( ) . length ) return false ; for ( int i = 0 ; i < method . getParameterTypes ( ) . length ; i ++ ) { Class rootParam = method . getParameterTypes ( ) [ i ] ; Class intfParam = intfMethod . getParameterTypes ( ) [ i ] ; if ( ! intfParam . isAssignableFrom ( rootParam ) ) return false ; } return true ; }
See if the two methods are compatible, that is they have the same
relative signature

@param method
@param intfMethod
@return
See if the two methods are compatible that is they have the same relative signature