[FIR generator] Move Implementation.Kind to common module
This is a step towards commonizing the code generator between FIR and IR: KT-61970
This commit is contained in:
committed by
Space Team
parent
e62343427d
commit
0dd01279da
+19
@@ -0,0 +1,19 @@
|
||||
/*
|
||||
* Copyright 2010-2023 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.generators.tree
|
||||
|
||||
enum class ImplementationKind(val title: String, val typeKind: TypeKind) {
|
||||
Interface("interface", TypeKind.Interface),
|
||||
FinalClass("class", TypeKind.Class),
|
||||
OpenClass("open class", TypeKind.Class),
|
||||
AbstractClass("abstract class", TypeKind.Class),
|
||||
SealedClass("sealed class", TypeKind.Class),
|
||||
SealedInterface("sealed interface", TypeKind.Interface),
|
||||
Object("object", TypeKind.Class);
|
||||
|
||||
val isInterface: Boolean
|
||||
get() = typeKind == TypeKind.Interface
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
* Copyright 2010-2023 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.generators.tree
|
||||
|
||||
interface ImplementationKindOwner : Importable {
|
||||
var kind: ImplementationKind?
|
||||
val allParents: List<ImplementationKindOwner>
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
/*
|
||||
* Copyright 2010-2023 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.generators.tree
|
||||
|
||||
enum class TypeKind {
|
||||
Class, Interface
|
||||
}
|
||||
Reference in New Issue
Block a user