(final String methodName, final Class<?>[] argumentTypes)
| 1724 | } |
| 1725 | |
| 1726 | private MetaMethod pickStaticMethod(final String methodName, final Class<?>[] argumentTypes) throws MethodSelectionException { |
| 1727 | MetaMethod method = null; |
| 1728 | MethodSelectionException mse = null; |
| 1729 | Object methods = getStaticMethods(theClass, methodName); |
| 1730 | |
| 1731 | if (!(methods instanceof FastArray) || !((FastArray) methods).isEmpty()) { |
| 1732 | try { |
| 1733 | method = (MetaMethod) chooseMethod(methodName, methods, argumentTypes); |
| 1734 | } catch (MethodSelectionException msex) { |
| 1735 | mse = msex; |
| 1736 | } |
| 1737 | } |
| 1738 | if (method == null && theClass != Class.class) { |
| 1739 | MetaClass cmc = registry.getMetaClass(Class.class); |
| 1740 | method = cmc.pickMethod(methodName, argumentTypes); |
| 1741 | } |
| 1742 | if (method == null) { |
| 1743 | method = (MetaMethod) chooseMethod(methodName, methods, argumentTypes); |
| 1744 | } |
| 1745 | |
| 1746 | if (method == null && mse != null) { |
| 1747 | throw mse; |
| 1748 | } else { |
| 1749 | return method; |
| 1750 | } |
| 1751 | } |
| 1752 | |
| 1753 | /** {@inheritDoc} */ |
| 1754 | @Override |
no test coverage detected