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

org.jetbrains.kotlin.types.error.ErrorModuleDescriptor.kt Maven / Gradle / Ivy

There is a newer version: 2.0.0
Show newest version
/*
 * Copyright 2010-2022 JetBrains s.r.o. and Kotlin Programming Language contributors.
 * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
 */

package org.jetbrains.kotlin.types.error

import org.jetbrains.kotlin.builtins.DefaultBuiltIns
import org.jetbrains.kotlin.builtins.KotlinBuiltIns
import org.jetbrains.kotlin.descriptors.*
import org.jetbrains.kotlin.descriptors.annotations.Annotations
import org.jetbrains.kotlin.name.FqName
import org.jetbrains.kotlin.name.Name
import org.jetbrains.kotlin.platform.TargetPlatform

object ErrorModuleDescriptor : ModuleDescriptor {
    override val stableName: Name = Name.special(ErrorEntity.ERROR_MODULE.debugText)
    override val platform: TargetPlatform? = null
    override val allDependencyModules: List = emptyList()
    override val expectedByModules: List = emptyList()
    override val allExpectedByModules: Set = emptySet()
    override val annotations: Annotations get() = Annotations.EMPTY
    override val builtIns: KotlinBuiltIns = DefaultBuiltIns.Instance
    override val isValid: Boolean = false

    override fun  getCapability(capability: ModuleCapability): T? = null
    override fun getSubPackagesOf(fqName: FqName, nameFilter: Function1): Collection = emptyList()
    override fun getName(): Name = stableName
    override fun getPackage(fqName: FqName): PackageViewDescriptor = throw IllegalStateException("Should not be called!")
    override fun getOriginal(): DeclarationDescriptor = this
    override fun getContainingDeclaration(): DeclarationDescriptor? = null
    override fun shouldSeeInternalsOf(targetModule: ModuleDescriptor): Boolean = false
    override fun assertValid() = throw InvalidModuleException("ERROR_MODULE is not a valid module")
    override fun  accept(visitor: DeclarationDescriptorVisitor, data: D): R? = null
    override fun acceptVoid(visitor: DeclarationDescriptorVisitor) {}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy