org.jetbrains.kotlin.psi.stubs.StubInterfaces.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kotlin-compiler-embeddable Show documentation
Show all versions of kotlin-compiler-embeddable Show documentation
the Kotlin compiler embeddable
/*
* Copyright 2010-2015 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.kotlin.psi.stubs
import com.intellij.psi.PsiNamedElement
import com.intellij.psi.stubs.NamedStub
import com.intellij.psi.stubs.PsiFileStub
import com.intellij.psi.stubs.StubElement
import org.jetbrains.kotlin.lexer.KtModifierKeywordToken
import org.jetbrains.kotlin.name.ClassId
import org.jetbrains.kotlin.name.FqName
import org.jetbrains.kotlin.psi.*
interface KotlinFileStub : PsiFileStub {
fun getPackageFqName(): FqName
fun isScript(): Boolean
fun findImportsByAlias(alias: String): List
}
interface KotlinPlaceHolderStub : StubElement
interface KotlinPlaceHolderWithTextStub : KotlinPlaceHolderStub {
fun text(): String
}
interface KotlinStubWithFqName : NamedStub {
fun getFqName(): FqName?
}
interface KotlinClassifierStub {
fun getClassId(): ClassId?
}
interface KotlinTypeAliasStub : KotlinClassifierStub, KotlinStubWithFqName {
fun isTopLevel(): Boolean
}
interface KotlinClassOrObjectStub : KotlinClassifierStub, KotlinStubWithFqName {
fun isLocal(): Boolean
fun getSuperNames(): List
fun isTopLevel(): Boolean
}
interface KotlinClassStub : KotlinClassOrObjectStub {
fun isInterface(): Boolean
fun isEnumEntry(): Boolean
}
interface KotlinObjectStub : KotlinClassOrObjectStub {
fun isCompanion(): Boolean
fun isObjectLiteral(): Boolean
}
interface KotlinValueArgumentStub : KotlinPlaceHolderStub {
fun isSpread(): Boolean
}
interface KotlinContractEffectStub : KotlinPlaceHolderStub {}
interface KotlinAnnotationEntryStub : StubElement {
fun getShortName(): String?
fun hasValueArguments(): Boolean
}
interface KotlinAnnotationUseSiteTargetStub : StubElement {
fun getUseSiteTarget(): String
}
interface KotlinFunctionStub : KotlinCallableStubBase {
fun hasBlockBody(): Boolean
fun hasBody(): Boolean
fun hasTypeParameterListBeforeFunctionName(): Boolean
fun mayHaveContract(): Boolean
}
interface KotlinConstructorStub> :
KotlinCallableStubBase {
fun hasBody(): Boolean
fun isDelegatedCallToThis(): Boolean
fun isExplicitDelegationCall(): Boolean
}
interface KotlinImportAliasStub : StubElement {
fun getName(): String?
}
interface KotlinImportDirectiveStub : StubElement {
fun isAllUnder(): Boolean
fun getImportedFqName(): FqName?
fun isValid(): Boolean
}
interface KotlinModifierListStub : StubElement {
fun hasModifier(modifierToken: KtModifierKeywordToken): Boolean
}
interface KotlinNameReferenceExpressionStub : StubElement {
fun getReferencedName(): String
}
interface KotlinEnumEntrySuperclassReferenceExpressionStub : StubElement {
fun getReferencedName(): String
}
interface KotlinParameterStub : KotlinStubWithFqName {
fun isMutable(): Boolean
fun hasValOrVar(): Boolean
fun hasDefaultValue(): Boolean
}
interface KotlinPropertyAccessorStub : StubElement {
fun isGetter(): Boolean
fun hasBody(): Boolean
fun hasBlockBody(): Boolean
}
interface KotlinBackingFieldStub : StubElement {
fun hasInitializer(): Boolean
}
interface KotlinPropertyStub : KotlinCallableStubBase {
fun isVar(): Boolean
fun hasDelegate(): Boolean
fun hasDelegateExpression(): Boolean
fun hasInitializer(): Boolean
fun hasReturnTypeRef(): Boolean
}
interface KotlinCallableStubBase : KotlinStubWithFqName {
fun isTopLevel(): Boolean
fun isExtension(): Boolean
}
interface KotlinTypeParameterStub : KotlinStubWithFqName {
fun isInVariance(): Boolean
fun isOutVariance(): Boolean
}
enum class ConstantValueKind {
NULL,
BOOLEAN_CONSTANT,
FLOAT_CONSTANT,
CHARACTER_CONSTANT,
INTEGER_CONSTANT
}
interface KotlinConstantExpressionStub : StubElement {
fun kind(): ConstantValueKind
fun value(): String
}
interface KotlinClassLiteralExpressionStub : StubElement
interface KotlinCollectionLiteralExpressionStub : StubElement
interface KotlinTypeProjectionStub : StubElement {
fun getProjectionKind(): KtProjectionKind
}
interface KotlinUserTypeStub : StubElement
interface KotlinScriptStub : KotlinStubWithFqName {
override fun getFqName(): FqName
}
interface KotlinContextReceiverStub : StubElement {
fun getLabel(): String?
}