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

Method getSuperClasses

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

Returns the cached super-class chain used while building method and property indexes. @return the cached super classes in lookup order

()

Source from the content-addressed store, hash-verified

494 * @return the cached super classes in lookup order
495 */
496 protected LinkedList<CachedClass> getSuperClasses() {
497 LinkedList<CachedClass> superClasses = new LinkedList<>();
498
499 if (theClass.isInterface()) {
500 superClasses.add(ReflectionCache.OBJECT_CLASS);
501 } else {
502 for (CachedClass c = theCachedClass; c != null; c = c.getCachedSuperClass()) {
503 superClasses.addFirst(c);
504 }
505 if (theCachedClass.isArray && theClass != Object[].class && !theClass.getComponentType().isPrimitive()) {
506 superClasses.addFirst(ReflectionCache.OBJECT_ARRAY_CLASS);
507 }
508 }
509 return superClasses;
510 }
511
512 private void removeMultimethodsOverloadedWithPrivateMethods() {
513 var mia = new MethodIndexAction() {

Callers 2

fillMethodIndexMethod · 0.95
setUpPropertiesMethod · 0.95

Calls 6

getCachedSuperClassMethod · 0.95
addFirstMethod · 0.80
isInterfaceMethod · 0.65
addMethod · 0.65
isPrimitiveMethod · 0.65
getComponentTypeMethod · 0.45

Tested by

no test coverage detected