Skip to content

getSuperNames

fun StubBasedPsiElementBase<out KotlinClassOrObjectStub<out KtClassOrObject>>.getSuperNames(): List<String>

Returns the unqualified names indexed as this class's superclass names. For names that might be imported through an alias, this includes both the original and aliased names; reference resolution during inheritor search disambiguates them.

Example:

Given derivedClass representing:

import library.Base as Alias

class Derived : Alias

derivedClass.getSuperNames() returns listOf("Alias", "Base").

Return

the list of possible superclass names