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

Method getSuperClass

src/main/java/org/codehaus/groovy/ast/ClassNode.java:532–543  ·  view source on GitHub ↗

@return the ClassNode of the super class of this type

()

Source from the content-addressed store, hash-verified

530 * @return the {@code ClassNode} of the super class of this type
531 */
532 public ClassNode getSuperClass() {
533 if (!lazyInitDone && !isResolved()) {
534 throw new GroovyBugError("ClassNode#getSuperClass for " + getName() + " called before class resolving");
535 }
536 var sc = redirect().getUnresolvedSuperClass();
537 if (sc != null) {
538 sc = sc.redirect();
539 if (isPrimaryClassNode() && (sc.isInterface() || isTrait(sc)))
540 sc = ClassHelper.OBJECT_TYPE; // GROOVY-8272, GROOVY-11299
541 }
542 return sc;
543 }
544
545 /**
546 * Sets the super class of this {@link ClassNode}. If this ClassNode has a redirect,

Callers 15

ancestorWithDecreasesMethod · 0.95
testArrayClassMethod · 0.95
resolveNestedClassMethod · 0.95
findClassMemberMethod · 0.95
getMetaClassFieldMethod · 0.95
detectNonSealedTypeMethod · 0.95
visitStdMethodMethod · 0.95

Calls 7

isResolvedMethod · 0.95
getNameMethod · 0.95
redirectMethod · 0.95
isPrimaryClassNodeMethod · 0.95
isInterfaceMethod · 0.65
isTraitMethod · 0.45

Tested by 1

testArrayClassMethod · 0.76