{@inheritDoc}
()
| 593 | performOperationOnMetaClass(new Runnable() { |
| 594 | /** {@inheritDoc} */ |
| 595 | @Override |
| 596 | public void run() { |
| 597 | MetaMethod existing = null; |
| 598 | try { |
| 599 | existing = pickMethod(metaMethodFromSuper.getName(), metaMethodFromSuper.getNativeParameterTypes()); |
| 600 | } catch ( GroovyRuntimeException e) { |
| 601 | // ignore, this happens with overlapping method definitions |
| 602 | } |
| 603 | if (existing == null) { |
| 604 | addMethodWithKey(metaMethodFromSuper); |
| 605 | } else { |
| 606 | boolean isGroovyMethod = getMetaMethods().contains(existing); |
| 607 | if (isGroovyMethod) { |
| 608 | addMethodWithKey(metaMethodFromSuper); |
| 609 | } else if (inheritedMetaMethods.contains(existing)) { |
| 610 | inheritedMetaMethods.remove(existing); |
| 611 | addMethodWithKey(metaMethodFromSuper); |
| 612 | } |
| 613 | } |
| 614 | } |
| 615 | |
| 616 | private void addMethodWithKey(final MetaMethod metaMethodFromSuper) { |
| 617 | inheritedMetaMethods.add(metaMethodFromSuper); |
nothing calls this directly
no test coverage detected