Extract the fully-qualified service name into a public static final field on the service container type.
diff --git a/compiler/src/test/golden/TestService.java.txt b/compiler/src/test/golden/TestService.java.txt
index 105aaba..9237548 100644
--- a/compiler/src/test/golden/TestService.java.txt
+++ b/compiler/src/test/golden/TestService.java.txt
@@ -16,6 +16,8 @@
@javax.annotation.Generated("by gRPC proto compiler")
public class TestServiceGrpc {
+ public static final String SERVICE_NAME = "grpc.testing.TestService";
+
// Static method descriptors that strictly reflect the proto.
@io.grpc.ExperimentalApi
public static final io.grpc.MethodDescriptor<io.grpc.testing.integration.Test.SimpleRequest,
@@ -220,7 +222,7 @@
public static io.grpc.ServerServiceDefinition bindService(
final TestService serviceImpl) {
- return io.grpc.ServerServiceDefinition.builder("grpc.testing.TestService")
+ return io.grpc.ServerServiceDefinition.builder(SERVICE_NAME)
.addMethod(io.grpc.ServerMethodDefinition.create(
METHOD_UNARY_CALL,
asyncUnaryCall(