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

Method methodNameAction

src/main/java/groovy/lang/MetaClassImpl.java:527–543  ·  view source on GitHub ↗

{@inheritDoc}

(final Class<?> clazz, final MetaMethodIndex.Cache entry)

Source from the content-addressed store, hash-verified

525
526 /** {@inheritDoc} */
527 @Override
528 public void methodNameAction(final Class<?> clazz, final MetaMethodIndex.Cache entry) {
529 if (hasPrivateInMethods(clazz, entry)) { // GROOVY-5193, etc.
530 // We have private methods for that name, so remove the
531 // multimethods. That is the same as in our index for
532 // super, so just copy the list from there. It is not
533 // possible to use a pointer here because the methods
534 // in the index for super are replaced later by MOP
535 // methods like super$5$foo
536 Object o = entry.methodsForSuper;
537 if (o instanceof FastArray) {
538 entry.methods = ((FastArray) o).copy();
539 } else {
540 entry.methods = o;
541 }
542 }
543 }
544
545 private boolean hasPrivateInMethods(final Class<?> clazz, final MetaMethodIndex.Cache entry) {
546 if (entry.methods instanceof FastArray methods) {

Callers

nothing calls this directly

Calls 2

hasPrivateInMethodsMethod · 0.95
copyMethod · 0.45

Tested by

no test coverage detected