Check two methods reflectively to see if one is overloading the other Note that the parameter ordering is important if one method is higher in the class hiearchy then the other. If this is the case, make sure the method higher up in the chain is the first parameter. Otherwise, the ordering does not
(Method higher, Method lower)
| 35 | * @return |
| 36 | */ |
| 37 | public static boolean isOverloaded(Method higher, Method lower) |
| 38 | { |
| 39 | if (namesAreEqual(higher, lower) && returnTypesAreEqualOrCovariant(higher, lower) && isNotInterfaceImplementation(higher, lower) |
| 40 | && isNotOverridden(higher, lower)) |
| 41 | { |
| 42 | return true; |
| 43 | |
| 44 | } |
| 45 | else |
| 46 | { |
| 47 | return false; |
| 48 | } |
| 49 | } |
| 50 | |
| 51 | private static boolean isNotOverridden(Method higher, Method lower) |
| 52 | { |