Add KClass.sealedSubclasses to get direct subclasses of sealed class
#KT-14657 Fixed
This commit is contained in:
committed by
Ilya Gorbunov
parent
1b1713a849
commit
cbc92bc9a1
@@ -76,6 +76,12 @@ public interface KClass<T : Any> : KDeclarationContainer, KAnnotatedElement, KCl
|
||||
@SinceKotlin("1.1")
|
||||
public val supertypes: List<KType>
|
||||
|
||||
/**
|
||||
* The list of the immediate subclasses if this class is a sealed class, or an empty list otherwise.
|
||||
*/
|
||||
@SinceKotlin("1.3")
|
||||
public val sealedSubclasses: List<KClass<out T>>
|
||||
|
||||
/**
|
||||
* Visibility of this class, or `null` if its visibility cannot be represented in Kotlin.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user