Inlcude the file that was used to generate service descriptors
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 45881e3..6268dd9 100644
--- a/benchmarks/src/generated/main/grpc/io/grpc/testing/TestServiceGrpc.java
+++ b/benchmarks/src/generated/main/grpc/io/grpc/testing/TestServiceGrpc.java
@@ -13,7 +13,9 @@
import static io.grpc.stub.ServerCalls.asyncClientStreamingCall;
import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall;
-@javax.annotation.Generated("by gRPC proto compiler")
+@javax.annotation.Generated(
+ value = "by gRPC proto compiler",
+ comments = "Source: qpstest.proto")
public class TestServiceGrpc {
private TestServiceGrpc() {}
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 0fa9d7d..86b5223 100644
--- a/benchmarks/src/generated/main/grpc/io/grpc/testing/WorkerGrpc.java
+++ b/benchmarks/src/generated/main/grpc/io/grpc/testing/WorkerGrpc.java
@@ -13,7 +13,9 @@
import static io.grpc.stub.ServerCalls.asyncClientStreamingCall;
import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall;
-@javax.annotation.Generated("by gRPC proto compiler")
+@javax.annotation.Generated(
+ value = "by gRPC proto compiler",
+ comments = "Source: qpstest.proto")
public class WorkerGrpc {
private WorkerGrpc() {}
diff --git a/compiler/src/java_plugin/cpp/java_generator.cpp b/compiler/src/java_plugin/cpp/java_generator.cpp
index cdb17c0..8be1575 100644
--- a/compiler/src/java_plugin/cpp/java_generator.cpp
+++ b/compiler/src/java_plugin/cpp/java_generator.cpp
@@ -639,10 +639,13 @@
Printer* p,
bool generate_nano) {
(*vars)["service_name"] = service->name();
+ (*vars)["file_name"] = service->file()->name();
(*vars)["service_class_name"] = ServiceClassName(service);
p->Print(
*vars,
- "@$Generated$(\"by gRPC proto compiler\")\n"
+ "@$Generated$(\n"
+ " value = \"by gRPC proto compiler\",\n"
+ " comments = \"Source: $file_name$\")\n"
"public class $service_class_name$ {\n\n");
p->Indent();
p->Print(
diff --git a/compiler/src/test/golden/TestService.java.txt b/compiler/src/test/golden/TestService.java.txt
index 904963e..3dbaa26 100644
--- a/compiler/src/test/golden/TestService.java.txt
+++ b/compiler/src/test/golden/TestService.java.txt
@@ -13,7 +13,9 @@
import static io.grpc.stub.ServerCalls.asyncClientStreamingCall;
import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall;
-@javax.annotation.Generated("by gRPC proto compiler")
+@javax.annotation.Generated(
+ value = "by gRPC proto compiler",
+ comments = "Source: test.proto")
public class TestServiceGrpc {
private TestServiceGrpc() {}
diff --git a/compiler/src/test/golden/TestServiceNano.java.txt b/compiler/src/test/golden/TestServiceNano.java.txt
index 4d8d1ba..b310d92 100644
--- a/compiler/src/test/golden/TestServiceNano.java.txt
+++ b/compiler/src/test/golden/TestServiceNano.java.txt
@@ -15,7 +15,9 @@
import java.io.IOException;
-@javax.annotation.Generated("by gRPC proto compiler")
+@javax.annotation.Generated(
+ value = "by gRPC proto compiler",
+ comments = "Source: test.proto")
public class TestServiceGrpc {
private TestServiceGrpc() {}
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 ae525ef..222b774 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
@@ -13,7 +13,9 @@
import static io.grpc.stub.ServerCalls.asyncClientStreamingCall;
import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall;
-@javax.annotation.Generated("by gRPC proto compiler")
+@javax.annotation.Generated(
+ value = "by gRPC proto compiler",
+ comments = "Source: helloworld.proto")
public class GreeterGrpc {
private GreeterGrpc() {}
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 6f732d1..d07de72 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
@@ -13,7 +13,9 @@
import static io.grpc.stub.ServerCalls.asyncClientStreamingCall;
import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall;
-@javax.annotation.Generated("by gRPC proto compiler")
+@javax.annotation.Generated(
+ value = "by gRPC proto compiler",
+ comments = "Source: route_guide.proto")
public class RouteGuideGrpc {
private RouteGuideGrpc() {}
diff --git a/grpclb/src/generated/main/grpc/io/grpc/grpclb/LoadBalancerGrpc.java b/grpclb/src/generated/main/grpc/io/grpc/grpclb/LoadBalancerGrpc.java
index 20a86f0..0b19a04 100644
--- a/grpclb/src/generated/main/grpc/io/grpc/grpclb/LoadBalancerGrpc.java
+++ b/grpclb/src/generated/main/grpc/io/grpc/grpclb/LoadBalancerGrpc.java
@@ -13,7 +13,9 @@
import static io.grpc.stub.ServerCalls.asyncClientStreamingCall;
import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall;
-@javax.annotation.Generated("by gRPC proto compiler")
+@javax.annotation.Generated(
+ value = "by gRPC proto compiler",
+ comments = "Source: load_balancer.proto")
public class LoadBalancerGrpc {
private LoadBalancerGrpc() {}
diff --git a/interop-testing/src/generated/main/grpc/io/grpc/testing/integration/ReconnectServiceGrpc.java b/interop-testing/src/generated/main/grpc/io/grpc/testing/integration/ReconnectServiceGrpc.java
index d27309f..d144168 100644
--- a/interop-testing/src/generated/main/grpc/io/grpc/testing/integration/ReconnectServiceGrpc.java
+++ b/interop-testing/src/generated/main/grpc/io/grpc/testing/integration/ReconnectServiceGrpc.java
@@ -13,7 +13,9 @@
import static io.grpc.stub.ServerCalls.asyncClientStreamingCall;
import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall;
-@javax.annotation.Generated("by gRPC proto compiler")
+@javax.annotation.Generated(
+ value = "by gRPC proto compiler",
+ comments = "Source: io/grpc/testing/integration/test.proto")
public class ReconnectServiceGrpc {
private ReconnectServiceGrpc() {}
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 a0939a6..f103d32 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
@@ -13,7 +13,9 @@
import static io.grpc.stub.ServerCalls.asyncClientStreamingCall;
import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall;
-@javax.annotation.Generated("by gRPC proto compiler")
+@javax.annotation.Generated(
+ value = "by gRPC proto compiler",
+ comments = "Source: io/grpc/testing/integration/test.proto")
public class TestServiceGrpc {
private TestServiceGrpc() {}
diff --git a/interop-testing/src/generated/main/grpc/io/grpc/testing/integration/UnimplementedServiceGrpc.java b/interop-testing/src/generated/main/grpc/io/grpc/testing/integration/UnimplementedServiceGrpc.java
index 3cf6587..e63001c 100644
--- a/interop-testing/src/generated/main/grpc/io/grpc/testing/integration/UnimplementedServiceGrpc.java
+++ b/interop-testing/src/generated/main/grpc/io/grpc/testing/integration/UnimplementedServiceGrpc.java
@@ -13,7 +13,9 @@
import static io.grpc.stub.ServerCalls.asyncClientStreamingCall;
import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall;
-@javax.annotation.Generated("by gRPC proto compiler")
+@javax.annotation.Generated(
+ value = "by gRPC proto compiler",
+ comments = "Source: io/grpc/testing/integration/test.proto")
public class UnimplementedServiceGrpc {
private UnimplementedServiceGrpc() {}