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

kotlinx.rpc.codegen.extension.ServiceDeclaration.kt Maven / Gradle / Ivy

There is a newer version: 2.0.21-0.4.0
Show newest version
/*
 * Copyright 2023-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
 */

package kotlinx.rpc.codegen.extension

import org.jetbrains.kotlin.ir.declarations.IrClass
import org.jetbrains.kotlin.ir.declarations.IrProperty
import org.jetbrains.kotlin.ir.declarations.IrSimpleFunction
import org.jetbrains.kotlin.ir.declarations.IrValueParameter
import org.jetbrains.kotlin.ir.types.IrType
import org.jetbrains.kotlin.ir.util.defaultType

class ServiceDeclaration(
    val service: IrClass,
    val stubClass: IrClass,
    val methods: List,
    val fields: List,
) {
    val simpleName: String = service.name.asString()
    val serviceType = service.defaultType

    class Method(
        val function: IrSimpleFunction,
        val arguments: List,
    ) {
        class Argument(
            val value: IrValueParameter,
            val type: IrType,
        )
    }

    class FlowField(
        val property: IrProperty,
        val flowKind: Kind,
    ) {
        enum class Kind {
            Plain, Shared, State;
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy