MCPcopy Index your code
hub / github.com/apache/groovy / run

Method run

src/main/java/groovy/lang/ExpandoMetaClass.java:595–614  ·  view source on GitHub ↗

{@inheritDoc}

()

Source from the content-addressed store, hash-verified

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);

Callers

nothing calls this directly

Calls 7

addMethodWithKeyMethod · 0.95
pickMethodMethod · 0.65
getNameMethod · 0.65
getMetaMethodsMethod · 0.65
removeMethod · 0.65
containsMethod · 0.45

Tested by

no test coverage detected