wire-kotlin-generator / com.squareup.wire.kotlin / KotlinGenerator

KotlinGenerator

class KotlinGenerator

Properties

schema

val schema: Schema

Functions

generateServiceTypeSpecs

fun generateServiceTypeSpecs(service: Service, onlyRpc: Rpc? = null): Map<ClassName, TypeSpec>

Generates all TypeSpecs for the given Service.

generateType

fun generateType(type: Type): TypeSpec

generatedServiceName

fun generatedServiceName(service: Service, rpc: Rpc? = null, isImplementation: Boolean = false): ClassName

Returns the full name of the class generated for service#rpc. This returns a name like RouteGuideClient or RouteGuideGetFeatureBlockingServer.

generatedTypeName

fun generatedTypeName(type: Type): ClassName

Returns the full name of the class generated for type.

Companion Object Functions

invoke

operator fun invoke(schema: Schema, emitAndroid: Boolean = false, javaInterop: Boolean = false, rpcCallStyle: RpcCallStyle = RpcCallStyle.SUSPENDING, rpcRole: RpcRole = RpcRole.CLIENT): KotlinGenerator