All Downloads are FREE. Search and download functionalities are using the official Maven repository.

.kotlin.kotlin-compiler.1.3.11.source-code.StubInterfaces.kt Maven / Gradle / Ivy

There is a newer version: 2.1.0-Beta1
Show newest version
/*
 * 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.FqName
import org.jetbrains.kotlin.psi.*

interface KotlinFileStub : PsiFileStub {
    fun getPackageFqName(): FqName
    fun isScript(): Boolean
    fun findImportsByAlias(alias: String): List
}

interface KotlinPlaceHolderStub : StubElement

interface KotlinStubWithFqName : NamedStub {
    fun getFqName(): FqName?
}

interface KotlinTypeAliasStub : KotlinStubWithFqName {
    fun isTopLevel(): Boolean
}

interface KotlinClassOrObjectStub : 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 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 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 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
}

interface KotlinTypeProjectionStub : StubElement {
    fun getProjectionKind(): KtProjectionKind
}

interface KotlinUserTypeStub : StubElement

interface KotlinScriptStub : KotlinStubWithFqName {
    override fun getFqName(): FqName
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy