mirror of https://github.com/grpc/grpc-java.git
Include Proto in the java_outer_classname for helloworld.proto
Specifying the outer class is a pretty common convention and avoids the outer classname changing depending on the contents of the proto file (as can be seen if outer_classname isn't specified in the route guide example). To avoid colliding, convention has it end in "Proto".
This commit is contained in:
parent
f6aba497ae
commit
9804b67f1a
|
|
@ -66,12 +66,12 @@ public final class HelloReply extends
|
|||
}
|
||||
public static final com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptor() {
|
||||
return io.grpc.examples.helloworld.HelloWorld.internal_static_helloworld_HelloReply_descriptor;
|
||||
return io.grpc.examples.helloworld.HelloWorldProto.internal_static_helloworld_HelloReply_descriptor;
|
||||
}
|
||||
|
||||
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
|
||||
internalGetFieldAccessorTable() {
|
||||
return io.grpc.examples.helloworld.HelloWorld.internal_static_helloworld_HelloReply_fieldAccessorTable
|
||||
return io.grpc.examples.helloworld.HelloWorldProto.internal_static_helloworld_HelloReply_fieldAccessorTable
|
||||
.ensureFieldAccessorsInitialized(
|
||||
io.grpc.examples.helloworld.HelloReply.class, io.grpc.examples.helloworld.HelloReply.Builder.class);
|
||||
}
|
||||
|
|
@ -224,12 +224,12 @@ public final class HelloReply extends
|
|||
io.grpc.examples.helloworld.HelloReplyOrBuilder {
|
||||
public static final com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptor() {
|
||||
return io.grpc.examples.helloworld.HelloWorld.internal_static_helloworld_HelloReply_descriptor;
|
||||
return io.grpc.examples.helloworld.HelloWorldProto.internal_static_helloworld_HelloReply_descriptor;
|
||||
}
|
||||
|
||||
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
|
||||
internalGetFieldAccessorTable() {
|
||||
return io.grpc.examples.helloworld.HelloWorld.internal_static_helloworld_HelloReply_fieldAccessorTable
|
||||
return io.grpc.examples.helloworld.HelloWorldProto.internal_static_helloworld_HelloReply_fieldAccessorTable
|
||||
.ensureFieldAccessorsInitialized(
|
||||
io.grpc.examples.helloworld.HelloReply.class, io.grpc.examples.helloworld.HelloReply.Builder.class);
|
||||
}
|
||||
|
|
@ -257,7 +257,7 @@ public final class HelloReply extends
|
|||
|
||||
public com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptorForType() {
|
||||
return io.grpc.examples.helloworld.HelloWorld.internal_static_helloworld_HelloReply_descriptor;
|
||||
return io.grpc.examples.helloworld.HelloWorldProto.internal_static_helloworld_HelloReply_descriptor;
|
||||
}
|
||||
|
||||
public io.grpc.examples.helloworld.HelloReply getDefaultInstanceForType() {
|
||||
|
|
|
|||
|
|
@ -66,12 +66,12 @@ public final class HelloRequest extends
|
|||
}
|
||||
public static final com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptor() {
|
||||
return io.grpc.examples.helloworld.HelloWorld.internal_static_helloworld_HelloRequest_descriptor;
|
||||
return io.grpc.examples.helloworld.HelloWorldProto.internal_static_helloworld_HelloRequest_descriptor;
|
||||
}
|
||||
|
||||
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
|
||||
internalGetFieldAccessorTable() {
|
||||
return io.grpc.examples.helloworld.HelloWorld.internal_static_helloworld_HelloRequest_fieldAccessorTable
|
||||
return io.grpc.examples.helloworld.HelloWorldProto.internal_static_helloworld_HelloRequest_fieldAccessorTable
|
||||
.ensureFieldAccessorsInitialized(
|
||||
io.grpc.examples.helloworld.HelloRequest.class, io.grpc.examples.helloworld.HelloRequest.Builder.class);
|
||||
}
|
||||
|
|
@ -224,12 +224,12 @@ public final class HelloRequest extends
|
|||
io.grpc.examples.helloworld.HelloRequestOrBuilder {
|
||||
public static final com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptor() {
|
||||
return io.grpc.examples.helloworld.HelloWorld.internal_static_helloworld_HelloRequest_descriptor;
|
||||
return io.grpc.examples.helloworld.HelloWorldProto.internal_static_helloworld_HelloRequest_descriptor;
|
||||
}
|
||||
|
||||
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
|
||||
internalGetFieldAccessorTable() {
|
||||
return io.grpc.examples.helloworld.HelloWorld.internal_static_helloworld_HelloRequest_fieldAccessorTable
|
||||
return io.grpc.examples.helloworld.HelloWorldProto.internal_static_helloworld_HelloRequest_fieldAccessorTable
|
||||
.ensureFieldAccessorsInitialized(
|
||||
io.grpc.examples.helloworld.HelloRequest.class, io.grpc.examples.helloworld.HelloRequest.Builder.class);
|
||||
}
|
||||
|
|
@ -257,7 +257,7 @@ public final class HelloRequest extends
|
|||
|
||||
public com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptorForType() {
|
||||
return io.grpc.examples.helloworld.HelloWorld.internal_static_helloworld_HelloRequest_descriptor;
|
||||
return io.grpc.examples.helloworld.HelloWorldProto.internal_static_helloworld_HelloRequest_descriptor;
|
||||
}
|
||||
|
||||
public io.grpc.examples.helloworld.HelloRequest getDefaultInstanceForType() {
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@
|
|||
|
||||
package io.grpc.examples.helloworld;
|
||||
|
||||
public final class HelloWorld {
|
||||
private HelloWorld() {}
|
||||
public final class HelloWorldProto {
|
||||
private HelloWorldProto() {}
|
||||
public static void registerAllExtensions(
|
||||
com.google.protobuf.ExtensionRegistry registry) {
|
||||
}
|
||||
|
|
@ -31,8 +31,8 @@ public final class HelloWorld {
|
|||
"equest\022\014\n\004name\030\001 \001(\t\"\035\n\nHelloReply\022\017\n\007me" +
|
||||
"ssage\030\001 \001(\t2I\n\007Greeter\022>\n\010SayHello\022\030.hel" +
|
||||
"loworld.HelloRequest\032\026.helloworld.HelloR" +
|
||||
"eply\"\000B1\n\033io.grpc.examples.helloworldB\nH" +
|
||||
"elloWorldP\001\242\002\003HLWb\006proto3"
|
||||
"eply\"\000B6\n\033io.grpc.examples.helloworldB\017H" +
|
||||
"elloWorldProtoP\001\242\002\003HLWb\006proto3"
|
||||
};
|
||||
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
|
||||
new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() {
|
||||
|
|
@ -31,7 +31,7 @@ syntax = "proto3";
|
|||
|
||||
option java_multiple_files = true;
|
||||
option java_package = "io.grpc.examples.helloworld";
|
||||
option java_outer_classname = "HelloWorld";
|
||||
option java_outer_classname = "HelloWorldProto";
|
||||
option objc_class_prefix = "HLW";
|
||||
|
||||
package helloworld;
|
||||
|
|
|
|||
Loading…
Reference in New Issue