Skip to content

KotlinConstructorStub

Properties

childrenStubs

@get:NotNull
abstract override val childrenStubs: @NotNull List<StubElement<*>?>

containingFileStub

@get:Nullable
abstract override val containingFileStub: @Nullable PsiFileStub<*>?

elementType

abstract override val elementType: IElementType?

fqName

abstract val fqName: FqName?

hasBody

abstract val hasBody: Boolean

Whether the declaration has a body (expression or block).

hasNoExpressionBody

Whether the declaration has a block body or no bodies at all.

isDelegatedCallToThis

isExplicitDelegationCall

isExtension

abstract val isExtension: Boolean

isTopLevel

abstract val isTopLevel: Boolean

kdocText

abstract val kdocText: String?

Raw KDoc text, if available.

Currently, KDoc is only available for decompiled declaration. For source ones one can read the KDoc content from the PSI directly.

mayHaveContract

abstract val mayHaveContract: Boolean

Whether the declaration may have a contract. false means that the declaration definitely has no contract, but true doesn't guarantee that the declaration has a contract.

name

@get:NonNls
@get:Nullable
abstract override val name: @NonNls @Nullable String?

parentStub

abstract override val parentStub: StubElement<*>?

psi

abstract override val psi: T?

stubSerializer

open val stubSerializer: ObjectStubSerializer<*, out Stub?>?

stubType

abstract override val stubType: IStubElementType<*, *>?

Functions

copyInto

abstract fun copyInto(newParent: StubElement<*>?): KotlinStubElement<T>

Returns a copy of this stub with the parent set to newParent.

Note: the implementation doesn't guarantee that com.intellij.psi.stubs.ObjectStubBase.isDangling flag is copied

findChildStubByElementType

open fun findChildStubByElementType(elementType: @NotNull IElementType): @Nullable StubElement<out PsiElement?>?

findChildStubByType

abstract fun <P : PsiElement?, S : StubElement<P?>?> findChildStubByType(p0: @NotNull IStubElementType<S?, P?>): @Nullable S?

getChildrenByType

abstract fun <E : PsiElement?> getChildrenByType(p0: @NotNull IElementType, p1: @NotNull ArrayFactory<out E?>): @NotNull Array<out E?>
abstract fun <E : PsiElement?> getChildrenByType(p0: @NotNull IElementType, p1: Array<out E?>?): @NotNull Array<out E?>
abstract fun <E : PsiElement?> getChildrenByType(p0: @NotNull TokenSet, p1: @NotNull ArrayFactory<out E?>): @NotNull Array<out E?>
abstract fun <E : PsiElement?> getChildrenByType(p0: @NotNull TokenSet, p1: Array<out E?>?): @NotNull Array<out E?>

getParentStubOfType

abstract fun <E : PsiElement?> getParentStubOfType(p0: @NotNull Class<E?>): @Nullable E?

getPsi

abstract fun getPsi(): T?

isEquivalentTo

abstract fun isEquivalentTo(other: KotlinStubElement<*>): Boolean

Returns whether two stubs have equivalent types and properties. Doesn't compare children stubs or any other tree structure details.

Note: This method shouldn't be used outside of compiler internals. Stubs from different files aren't supposed to be comparable, that's why equals / hashCode are not implemented, as they would lead to incorrect behavior.