diff --git a/benchmarks/src/generated/main/grpc/io/grpc/testing/TestServiceGrpc.java b/benchmarks/src/generated/main/grpc/io/grpc/testing/TestServiceGrpc.java index d2ac474ba3..005dab5713 100644 --- a/benchmarks/src/generated/main/grpc/io/grpc/testing/TestServiceGrpc.java +++ b/benchmarks/src/generated/main/grpc/io/grpc/testing/TestServiceGrpc.java @@ -21,16 +21,16 @@ public class TestServiceGrpc { io.grpc.MethodDescriptor.create( io.grpc.MethodDescriptor.MethodType.UNARY, "grpc.testing.TestService", "UnaryCall", - io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.SimpleRequest.PARSER), - io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.SimpleResponse.PARSER)); + io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.SimpleRequest.parser()), + io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.SimpleResponse.parser())); // Static method descriptors that strictly reflect the proto. public static final io.grpc.MethodDescriptor METHOD_STREAMING_CALL = io.grpc.MethodDescriptor.create( io.grpc.MethodDescriptor.MethodType.DUPLEX_STREAMING, "grpc.testing.TestService", "StreamingCall", - io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.SimpleRequest.PARSER), - io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.SimpleResponse.PARSER)); + io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.SimpleRequest.parser()), + io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.SimpleResponse.parser())); public static TestServiceStub newStub(io.grpc.Channel channel) { return new TestServiceStub(channel, CONFIG); diff --git a/benchmarks/src/generated/main/grpc/io/grpc/testing/WorkerGrpc.java b/benchmarks/src/generated/main/grpc/io/grpc/testing/WorkerGrpc.java index 37dbacf48a..b5cba59b6c 100644 --- a/benchmarks/src/generated/main/grpc/io/grpc/testing/WorkerGrpc.java +++ b/benchmarks/src/generated/main/grpc/io/grpc/testing/WorkerGrpc.java @@ -21,16 +21,16 @@ public class WorkerGrpc { io.grpc.MethodDescriptor.create( io.grpc.MethodDescriptor.MethodType.DUPLEX_STREAMING, "grpc.testing.Worker", "RunTest", - io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.ClientArgs.PARSER), - io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.ClientStatus.PARSER)); + io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.ClientArgs.parser()), + io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.ClientStatus.parser())); // Static method descriptors that strictly reflect the proto. public static final io.grpc.MethodDescriptor METHOD_RUN_SERVER = io.grpc.MethodDescriptor.create( io.grpc.MethodDescriptor.MethodType.DUPLEX_STREAMING, "grpc.testing.Worker", "RunServer", - io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.ServerArgs.PARSER), - io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.ServerStatus.PARSER)); + io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.ServerArgs.parser()), + io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.ServerStatus.parser())); public static WorkerStub newStub(io.grpc.Channel channel) { return new WorkerStub(channel, CONFIG); diff --git a/compiler/src/java_plugin/cpp/java_generator.cpp b/compiler/src/java_plugin/cpp/java_generator.cpp index bac19ca590..54eb8f3bae 100644 --- a/compiler/src/java_plugin/cpp/java_generator.cpp +++ b/compiler/src/java_plugin/cpp/java_generator.cpp @@ -122,8 +122,8 @@ static void PrintMethodFields( " $MethodDescriptor$.create(\n" " $MethodType$.$method_type$,\n" " \"$Package$$service_name$\", \"$method_name$\",\n" - " $ProtoUtils$.marshaller($input_type$.PARSER),\n" - " $ProtoUtils$.marshaller($output_type$.PARSER));\n"); + " $ProtoUtils$.marshaller($input_type$.parser()),\n" + " $ProtoUtils$.marshaller($output_type$.parser()));\n"); } } p->Print("\n"); diff --git a/compiler/src/test/golden/TestService.java.txt b/compiler/src/test/golden/TestService.java.txt index 13d92f3733..5d6dae0fdf 100644 --- a/compiler/src/test/golden/TestService.java.txt +++ b/compiler/src/test/golden/TestService.java.txt @@ -21,40 +21,40 @@ public class TestServiceGrpc { io.grpc.MethodDescriptor.create( io.grpc.MethodDescriptor.MethodType.UNARY, "grpc.testing.TestService", "UnaryCall", - io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Test.SimpleRequest.PARSER), - io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Test.SimpleResponse.PARSER)); + io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Test.SimpleRequest.parser()), + io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Test.SimpleResponse.parser())); // Static method descriptors that strictly reflect the proto. public static final io.grpc.MethodDescriptor METHOD_STREAMING_OUTPUT_CALL = io.grpc.MethodDescriptor.create( io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING, "grpc.testing.TestService", "StreamingOutputCall", - io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Test.StreamingOutputCallRequest.PARSER), - io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Test.StreamingOutputCallResponse.PARSER)); + io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Test.StreamingOutputCallRequest.parser()), + io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Test.StreamingOutputCallResponse.parser())); // Static method descriptors that strictly reflect the proto. public static final io.grpc.MethodDescriptor METHOD_STREAMING_INPUT_CALL = io.grpc.MethodDescriptor.create( io.grpc.MethodDescriptor.MethodType.CLIENT_STREAMING, "grpc.testing.TestService", "StreamingInputCall", - io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Test.StreamingInputCallRequest.PARSER), - io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Test.StreamingInputCallResponse.PARSER)); + io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Test.StreamingInputCallRequest.parser()), + io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Test.StreamingInputCallResponse.parser())); // Static method descriptors that strictly reflect the proto. public static final io.grpc.MethodDescriptor METHOD_FULL_DUPLEX_CALL = io.grpc.MethodDescriptor.create( io.grpc.MethodDescriptor.MethodType.DUPLEX_STREAMING, "grpc.testing.TestService", "FullDuplexCall", - io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Test.StreamingOutputCallRequest.PARSER), - io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Test.StreamingOutputCallResponse.PARSER)); + io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Test.StreamingOutputCallRequest.parser()), + io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Test.StreamingOutputCallResponse.parser())); // Static method descriptors that strictly reflect the proto. public static final io.grpc.MethodDescriptor METHOD_HALF_DUPLEX_CALL = io.grpc.MethodDescriptor.create( io.grpc.MethodDescriptor.MethodType.DUPLEX_STREAMING, "grpc.testing.TestService", "HalfDuplexCall", - io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Test.StreamingOutputCallRequest.PARSER), - io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Test.StreamingOutputCallResponse.PARSER)); + io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Test.StreamingOutputCallRequest.parser()), + io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Test.StreamingOutputCallResponse.parser())); public static TestServiceStub newStub(io.grpc.Channel channel) { return new TestServiceStub(channel, CONFIG); diff --git a/examples/src/generated/main/grpc/io/grpc/examples/helloworld/GreeterGrpc.java b/examples/src/generated/main/grpc/io/grpc/examples/helloworld/GreeterGrpc.java index 5e25372750..70b0020383 100644 --- a/examples/src/generated/main/grpc/io/grpc/examples/helloworld/GreeterGrpc.java +++ b/examples/src/generated/main/grpc/io/grpc/examples/helloworld/GreeterGrpc.java @@ -21,8 +21,8 @@ public class GreeterGrpc { io.grpc.MethodDescriptor.create( io.grpc.MethodDescriptor.MethodType.UNARY, "helloworld.Greeter", "SayHello", - io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.examples.helloworld.HelloRequest.PARSER), - io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.examples.helloworld.HelloResponse.PARSER)); + io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.examples.helloworld.HelloRequest.parser()), + io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.examples.helloworld.HelloResponse.parser())); public static GreeterStub newStub(io.grpc.Channel channel) { return new GreeterStub(channel, CONFIG); diff --git a/examples/src/generated/main/grpc/io/grpc/examples/routeguide/RouteGuideGrpc.java b/examples/src/generated/main/grpc/io/grpc/examples/routeguide/RouteGuideGrpc.java index 9a1b805a27..8930e88830 100644 --- a/examples/src/generated/main/grpc/io/grpc/examples/routeguide/RouteGuideGrpc.java +++ b/examples/src/generated/main/grpc/io/grpc/examples/routeguide/RouteGuideGrpc.java @@ -21,32 +21,32 @@ public class RouteGuideGrpc { io.grpc.MethodDescriptor.create( io.grpc.MethodDescriptor.MethodType.UNARY, "routeguide.RouteGuide", "GetFeature", - io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.examples.routeguide.Point.PARSER), - io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.examples.routeguide.Feature.PARSER)); + io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.examples.routeguide.Point.parser()), + io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.examples.routeguide.Feature.parser())); // Static method descriptors that strictly reflect the proto. public static final io.grpc.MethodDescriptor METHOD_LIST_FEATURES = io.grpc.MethodDescriptor.create( io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING, "routeguide.RouteGuide", "ListFeatures", - io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.examples.routeguide.Rectangle.PARSER), - io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.examples.routeguide.Feature.PARSER)); + io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.examples.routeguide.Rectangle.parser()), + io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.examples.routeguide.Feature.parser())); // Static method descriptors that strictly reflect the proto. public static final io.grpc.MethodDescriptor METHOD_RECORD_ROUTE = io.grpc.MethodDescriptor.create( io.grpc.MethodDescriptor.MethodType.CLIENT_STREAMING, "routeguide.RouteGuide", "RecordRoute", - io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.examples.routeguide.Point.PARSER), - io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.examples.routeguide.RouteSummary.PARSER)); + io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.examples.routeguide.Point.parser()), + io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.examples.routeguide.RouteSummary.parser())); // Static method descriptors that strictly reflect the proto. public static final io.grpc.MethodDescriptor METHOD_ROUTE_CHAT = io.grpc.MethodDescriptor.create( io.grpc.MethodDescriptor.MethodType.DUPLEX_STREAMING, "routeguide.RouteGuide", "RouteChat", - io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.examples.routeguide.RouteNote.PARSER), - io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.examples.routeguide.RouteNote.PARSER)); + io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.examples.routeguide.RouteNote.parser()), + io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.examples.routeguide.RouteNote.parser())); public static RouteGuideStub newStub(io.grpc.Channel channel) { return new RouteGuideStub(channel, CONFIG); diff --git a/interop-testing/src/generated/main/grpc/io/grpc/testing/integration/TestServiceGrpc.java b/interop-testing/src/generated/main/grpc/io/grpc/testing/integration/TestServiceGrpc.java index 360e18b431..87352867b2 100644 --- a/interop-testing/src/generated/main/grpc/io/grpc/testing/integration/TestServiceGrpc.java +++ b/interop-testing/src/generated/main/grpc/io/grpc/testing/integration/TestServiceGrpc.java @@ -21,48 +21,48 @@ public class TestServiceGrpc { io.grpc.MethodDescriptor.create( io.grpc.MethodDescriptor.MethodType.UNARY, "grpc.testing.TestService", "EmptyCall", - io.grpc.protobuf.ProtoUtils.marshaller(com.google.protobuf.EmptyProtos.Empty.PARSER), - io.grpc.protobuf.ProtoUtils.marshaller(com.google.protobuf.EmptyProtos.Empty.PARSER)); + io.grpc.protobuf.ProtoUtils.marshaller(com.google.protobuf.EmptyProtos.Empty.parser()), + io.grpc.protobuf.ProtoUtils.marshaller(com.google.protobuf.EmptyProtos.Empty.parser())); // Static method descriptors that strictly reflect the proto. public static final io.grpc.MethodDescriptor METHOD_UNARY_CALL = io.grpc.MethodDescriptor.create( io.grpc.MethodDescriptor.MethodType.UNARY, "grpc.testing.TestService", "UnaryCall", - io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Messages.SimpleRequest.PARSER), - io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Messages.SimpleResponse.PARSER)); + io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Messages.SimpleRequest.parser()), + io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Messages.SimpleResponse.parser())); // Static method descriptors that strictly reflect the proto. public static final io.grpc.MethodDescriptor METHOD_STREAMING_OUTPUT_CALL = io.grpc.MethodDescriptor.create( io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING, "grpc.testing.TestService", "StreamingOutputCall", - io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Messages.StreamingOutputCallRequest.PARSER), - io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Messages.StreamingOutputCallResponse.PARSER)); + io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Messages.StreamingOutputCallRequest.parser()), + io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Messages.StreamingOutputCallResponse.parser())); // Static method descriptors that strictly reflect the proto. public static final io.grpc.MethodDescriptor METHOD_STREAMING_INPUT_CALL = io.grpc.MethodDescriptor.create( io.grpc.MethodDescriptor.MethodType.CLIENT_STREAMING, "grpc.testing.TestService", "StreamingInputCall", - io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Messages.StreamingInputCallRequest.PARSER), - io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Messages.StreamingInputCallResponse.PARSER)); + io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Messages.StreamingInputCallRequest.parser()), + io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Messages.StreamingInputCallResponse.parser())); // Static method descriptors that strictly reflect the proto. public static final io.grpc.MethodDescriptor METHOD_FULL_DUPLEX_CALL = io.grpc.MethodDescriptor.create( io.grpc.MethodDescriptor.MethodType.DUPLEX_STREAMING, "grpc.testing.TestService", "FullDuplexCall", - io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Messages.StreamingOutputCallRequest.PARSER), - io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Messages.StreamingOutputCallResponse.PARSER)); + io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Messages.StreamingOutputCallRequest.parser()), + io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Messages.StreamingOutputCallResponse.parser())); // Static method descriptors that strictly reflect the proto. public static final io.grpc.MethodDescriptor METHOD_HALF_DUPLEX_CALL = io.grpc.MethodDescriptor.create( io.grpc.MethodDescriptor.MethodType.DUPLEX_STREAMING, "grpc.testing.TestService", "HalfDuplexCall", - io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Messages.StreamingOutputCallRequest.PARSER), - io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Messages.StreamingOutputCallResponse.PARSER)); + io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Messages.StreamingOutputCallRequest.parser()), + io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Messages.StreamingOutputCallResponse.parser())); public static TestServiceStub newStub(io.grpc.Channel channel) { return new TestServiceStub(channel, CONFIG);