(Class clas, String methodName, String[] paramTypes)
| 598 | |
| 599 | |
| 600 | boolean classContainsMethod(Class clas, String methodName, String[] paramTypes) { |
| 601 | while (clas != null) { |
| 602 | Method[] methods = clas.getDeclaredMethods(); |
| 603 | for (Method method : methods) { |
| 604 | if (method.getName().equals(methodName)) { |
| 605 | String[] methodParamTypes = getTypeDescriptors(method.getParameterTypes()); |
| 606 | boolean found = true; |
| 607 | for (int j = 0; j < methodParamTypes.length; j++) { |
| 608 | if (!paramTypes[j].equals(methodParamTypes[j])) { |
| 609 | found = false; |
| 610 | break; |
| 611 | } |
| 612 | } |
| 613 | if (found) { |
| 614 | return true; |
| 615 | } |
| 616 | } |
| 617 | } |
| 618 | |
| 619 | clas = clas.getSuperclass(); |
| 620 | } |
| 621 | |
| 622 | return false; |
| 623 | } |
| 624 | |
| 625 | |
| 626 | /** |
no test coverage detected