Skip to content

Commit

Permalink
Rename KtMarshaller to Marshaller (#320)
Browse files Browse the repository at this point in the history
Guess I forgot this one.
  • Loading branch information
andrewparmet authored Dec 20, 2024
1 parent 48fe4a8 commit a00a12b
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ import protokt.v1.codegen.util.Method
import protokt.v1.codegen.util.PROTOKT_V1_GOOGLE_PROTO
import protokt.v1.codegen.util.Service
import protokt.v1.gradle.KotlinTarget
import protokt.v1.grpc.KtMarshaller
import protokt.v1.grpc.Marshaller
import protokt.v1.grpc.SchemaDescriptor
import kotlin.coroutines.CoroutineContext
import kotlin.coroutines.EmptyCoroutineContext
Expand Down Expand Up @@ -420,7 +420,7 @@ private class ServiceGenerator(

private fun pivotClassName(jvmClass: KClass<*>) =
when (kotlinTarget) {
KotlinTarget.MultiplatformJs -> ClassName(KtMarshaller::class.java.`package`!!.name, jvmClass.asTypeName().simpleNames)
KotlinTarget.MultiplatformJs -> ClassName(Marshaller::class.java.`package`!!.name, jvmClass.asTypeName().simpleNames)
else -> jvmClass.asTypeName()
}

Expand Down Expand Up @@ -475,7 +475,7 @@ private fun Method.responseMarshaller(): CodeBlock =
private fun marshaller(string: String, type: ClassName) =
string.takeIf { it.isNotEmpty() }
?.let { CodeBlock.of("%L", it) }
?: CodeBlock.of("%T(%T)", KtMarshaller::class, type)
?: CodeBlock.of("%T(%T)", Marshaller::class, type)

private fun methodType(m: Method) =
when {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public final class com/toasttab/protokt/grpc/SchemaDescriptor {
public final fun getFileDescriptorUntyped ()Ljava/lang/Object;
}

public final class protokt/v1/grpc/KtMarshaller : io/grpc/MethodDescriptor$Marshaller {
public final class protokt/v1/grpc/Marshaller : io/grpc/MethodDescriptor$Marshaller {
public fun <init> (Lprotokt/v1/Deserializer;)V
public synthetic fun parse (Ljava/io/InputStream;)Ljava/lang/Object;
public fun parse (Ljava/io/InputStream;)Lprotokt/v1/Message;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import protokt.v1.Deserializer
import protokt.v1.Message

@Beta
class KtMarshaller<T : Message>(
class Marshaller<T : Message>(
private val deserializer: Deserializer<T>
) : MethodDescriptor.Marshaller<T> {
override fun parse(bytes: ByteArray) =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import protokt.v1.Deserializer
import protokt.v1.Message
import java.io.InputStream

class KtMarshaller<T : Message>(
class Marshaller<T : Message>(
private val deserializer: Deserializer<T>
) : MethodDescriptor.Marshaller<T> {
override fun stream(value: T) =
Expand Down

0 comments on commit a00a12b

Please sign in to comment.