diff options
author | Eric Gribkoff <ericgribkoff@google.com> | 2018-02-08 11:25:38 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-08 11:25:38 -0800 |
commit | 6f9b4e87e16192b870cc13bd2d48f4db187d2308 (patch) | |
tree | 90db349cd960b427103406c90820490d8928cf6f /testing-proto | |
parent | f8c7f963efb441cee24f94ffc97aeb642a0a1c9c (diff) | |
download | grpc-grpc-java-6f9b4e87e16192b870cc13bd2d48f4db187d2308.tar.gz |
compiler: avoid invoking experimental method in generated code
Diffstat (limited to 'testing-proto')
-rw-r--r-- | testing-proto/src/generated/main/grpc/io/grpc/testing/protobuf/SimpleServiceGrpc.java | 66 |
1 files changed, 43 insertions, 23 deletions
diff --git a/testing-proto/src/generated/main/grpc/io/grpc/testing/protobuf/SimpleServiceGrpc.java b/testing-proto/src/generated/main/grpc/io/grpc/testing/protobuf/SimpleServiceGrpc.java index 1bd2fe89c..96abc3d21 100644 --- a/testing-proto/src/generated/main/grpc/io/grpc/testing/protobuf/SimpleServiceGrpc.java +++ b/testing-proto/src/generated/main/grpc/io/grpc/testing/protobuf/SimpleServiceGrpc.java @@ -33,7 +33,7 @@ public final class SimpleServiceGrpc { @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") @java.lang.Deprecated // Use {@link #getUnaryRpcMethod()} instead. public static final io.grpc.MethodDescriptor<io.grpc.testing.protobuf.SimpleRequest, - io.grpc.testing.protobuf.SimpleResponse> METHOD_UNARY_RPC = getUnaryRpcMethod(); + io.grpc.testing.protobuf.SimpleResponse> METHOD_UNARY_RPC = getUnaryRpcMethodHelper(); private static volatile io.grpc.MethodDescriptor<io.grpc.testing.protobuf.SimpleRequest, io.grpc.testing.protobuf.SimpleResponse> getUnaryRpcMethod; @@ -41,6 +41,11 @@ public final class SimpleServiceGrpc { @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") public static io.grpc.MethodDescriptor<io.grpc.testing.protobuf.SimpleRequest, io.grpc.testing.protobuf.SimpleResponse> getUnaryRpcMethod() { + return getUnaryRpcMethodHelper(); + } + + private static io.grpc.MethodDescriptor<io.grpc.testing.protobuf.SimpleRequest, + io.grpc.testing.protobuf.SimpleResponse> getUnaryRpcMethodHelper() { io.grpc.MethodDescriptor<io.grpc.testing.protobuf.SimpleRequest, io.grpc.testing.protobuf.SimpleResponse> getUnaryRpcMethod; if ((getUnaryRpcMethod = SimpleServiceGrpc.getUnaryRpcMethod) == null) { synchronized (SimpleServiceGrpc.class) { @@ -65,7 +70,7 @@ public final class SimpleServiceGrpc { @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") @java.lang.Deprecated // Use {@link #getClientStreamingRpcMethod()} instead. public static final io.grpc.MethodDescriptor<io.grpc.testing.protobuf.SimpleRequest, - io.grpc.testing.protobuf.SimpleResponse> METHOD_CLIENT_STREAMING_RPC = getClientStreamingRpcMethod(); + io.grpc.testing.protobuf.SimpleResponse> METHOD_CLIENT_STREAMING_RPC = getClientStreamingRpcMethodHelper(); private static volatile io.grpc.MethodDescriptor<io.grpc.testing.protobuf.SimpleRequest, io.grpc.testing.protobuf.SimpleResponse> getClientStreamingRpcMethod; @@ -73,6 +78,11 @@ public final class SimpleServiceGrpc { @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") public static io.grpc.MethodDescriptor<io.grpc.testing.protobuf.SimpleRequest, io.grpc.testing.protobuf.SimpleResponse> getClientStreamingRpcMethod() { + return getClientStreamingRpcMethodHelper(); + } + + private static io.grpc.MethodDescriptor<io.grpc.testing.protobuf.SimpleRequest, + io.grpc.testing.protobuf.SimpleResponse> getClientStreamingRpcMethodHelper() { io.grpc.MethodDescriptor<io.grpc.testing.protobuf.SimpleRequest, io.grpc.testing.protobuf.SimpleResponse> getClientStreamingRpcMethod; if ((getClientStreamingRpcMethod = SimpleServiceGrpc.getClientStreamingRpcMethod) == null) { synchronized (SimpleServiceGrpc.class) { @@ -97,7 +107,7 @@ public final class SimpleServiceGrpc { @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") @java.lang.Deprecated // Use {@link #getServerStreamingRpcMethod()} instead. public static final io.grpc.MethodDescriptor<io.grpc.testing.protobuf.SimpleRequest, - io.grpc.testing.protobuf.SimpleResponse> METHOD_SERVER_STREAMING_RPC = getServerStreamingRpcMethod(); + io.grpc.testing.protobuf.SimpleResponse> METHOD_SERVER_STREAMING_RPC = getServerStreamingRpcMethodHelper(); private static volatile io.grpc.MethodDescriptor<io.grpc.testing.protobuf.SimpleRequest, io.grpc.testing.protobuf.SimpleResponse> getServerStreamingRpcMethod; @@ -105,6 +115,11 @@ public final class SimpleServiceGrpc { @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") public static io.grpc.MethodDescriptor<io.grpc.testing.protobuf.SimpleRequest, io.grpc.testing.protobuf.SimpleResponse> getServerStreamingRpcMethod() { + return getServerStreamingRpcMethodHelper(); + } + + private static io.grpc.MethodDescriptor<io.grpc.testing.protobuf.SimpleRequest, + io.grpc.testing.protobuf.SimpleResponse> getServerStreamingRpcMethodHelper() { io.grpc.MethodDescriptor<io.grpc.testing.protobuf.SimpleRequest, io.grpc.testing.protobuf.SimpleResponse> getServerStreamingRpcMethod; if ((getServerStreamingRpcMethod = SimpleServiceGrpc.getServerStreamingRpcMethod) == null) { synchronized (SimpleServiceGrpc.class) { @@ -129,7 +144,7 @@ public final class SimpleServiceGrpc { @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") @java.lang.Deprecated // Use {@link #getBidiStreamingRpcMethod()} instead. public static final io.grpc.MethodDescriptor<io.grpc.testing.protobuf.SimpleRequest, - io.grpc.testing.protobuf.SimpleResponse> METHOD_BIDI_STREAMING_RPC = getBidiStreamingRpcMethod(); + io.grpc.testing.protobuf.SimpleResponse> METHOD_BIDI_STREAMING_RPC = getBidiStreamingRpcMethodHelper(); private static volatile io.grpc.MethodDescriptor<io.grpc.testing.protobuf.SimpleRequest, io.grpc.testing.protobuf.SimpleResponse> getBidiStreamingRpcMethod; @@ -137,6 +152,11 @@ public final class SimpleServiceGrpc { @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") public static io.grpc.MethodDescriptor<io.grpc.testing.protobuf.SimpleRequest, io.grpc.testing.protobuf.SimpleResponse> getBidiStreamingRpcMethod() { + return getBidiStreamingRpcMethodHelper(); + } + + private static io.grpc.MethodDescriptor<io.grpc.testing.protobuf.SimpleRequest, + io.grpc.testing.protobuf.SimpleResponse> getBidiStreamingRpcMethodHelper() { io.grpc.MethodDescriptor<io.grpc.testing.protobuf.SimpleRequest, io.grpc.testing.protobuf.SimpleResponse> getBidiStreamingRpcMethod; if ((getBidiStreamingRpcMethod = SimpleServiceGrpc.getBidiStreamingRpcMethod) == null) { synchronized (SimpleServiceGrpc.class) { @@ -196,7 +216,7 @@ public final class SimpleServiceGrpc { */ public void unaryRpc(io.grpc.testing.protobuf.SimpleRequest request, io.grpc.stub.StreamObserver<io.grpc.testing.protobuf.SimpleResponse> responseObserver) { - asyncUnimplementedUnaryCall(getUnaryRpcMethod(), responseObserver); + asyncUnimplementedUnaryCall(getUnaryRpcMethodHelper(), responseObserver); } /** @@ -206,7 +226,7 @@ public final class SimpleServiceGrpc { */ public io.grpc.stub.StreamObserver<io.grpc.testing.protobuf.SimpleRequest> clientStreamingRpc( io.grpc.stub.StreamObserver<io.grpc.testing.protobuf.SimpleResponse> responseObserver) { - return asyncUnimplementedStreamingCall(getClientStreamingRpcMethod(), responseObserver); + return asyncUnimplementedStreamingCall(getClientStreamingRpcMethodHelper(), responseObserver); } /** @@ -216,7 +236,7 @@ public final class SimpleServiceGrpc { */ public void serverStreamingRpc(io.grpc.testing.protobuf.SimpleRequest request, io.grpc.stub.StreamObserver<io.grpc.testing.protobuf.SimpleResponse> responseObserver) { - asyncUnimplementedUnaryCall(getServerStreamingRpcMethod(), responseObserver); + asyncUnimplementedUnaryCall(getServerStreamingRpcMethodHelper(), responseObserver); } /** @@ -226,34 +246,34 @@ public final class SimpleServiceGrpc { */ public io.grpc.stub.StreamObserver<io.grpc.testing.protobuf.SimpleRequest> bidiStreamingRpc( io.grpc.stub.StreamObserver<io.grpc.testing.protobuf.SimpleResponse> responseObserver) { - return asyncUnimplementedStreamingCall(getBidiStreamingRpcMethod(), responseObserver); + return asyncUnimplementedStreamingCall(getBidiStreamingRpcMethodHelper(), responseObserver); } @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) .addMethod( - getUnaryRpcMethod(), + getUnaryRpcMethodHelper(), asyncUnaryCall( new MethodHandlers< io.grpc.testing.protobuf.SimpleRequest, io.grpc.testing.protobuf.SimpleResponse>( this, METHODID_UNARY_RPC))) .addMethod( - getClientStreamingRpcMethod(), + getClientStreamingRpcMethodHelper(), asyncClientStreamingCall( new MethodHandlers< io.grpc.testing.protobuf.SimpleRequest, io.grpc.testing.protobuf.SimpleResponse>( this, METHODID_CLIENT_STREAMING_RPC))) .addMethod( - getServerStreamingRpcMethod(), + getServerStreamingRpcMethodHelper(), asyncServerStreamingCall( new MethodHandlers< io.grpc.testing.protobuf.SimpleRequest, io.grpc.testing.protobuf.SimpleResponse>( this, METHODID_SERVER_STREAMING_RPC))) .addMethod( - getBidiStreamingRpcMethod(), + getBidiStreamingRpcMethodHelper(), asyncBidiStreamingCall( new MethodHandlers< io.grpc.testing.protobuf.SimpleRequest, @@ -292,7 +312,7 @@ public final class SimpleServiceGrpc { public void unaryRpc(io.grpc.testing.protobuf.SimpleRequest request, io.grpc.stub.StreamObserver<io.grpc.testing.protobuf.SimpleResponse> responseObserver) { asyncUnaryCall( - getChannel().newCall(getUnaryRpcMethod(), getCallOptions()), request, responseObserver); + getChannel().newCall(getUnaryRpcMethodHelper(), getCallOptions()), request, responseObserver); } /** @@ -303,7 +323,7 @@ public final class SimpleServiceGrpc { public io.grpc.stub.StreamObserver<io.grpc.testing.protobuf.SimpleRequest> clientStreamingRpc( io.grpc.stub.StreamObserver<io.grpc.testing.protobuf.SimpleResponse> responseObserver) { return asyncClientStreamingCall( - getChannel().newCall(getClientStreamingRpcMethod(), getCallOptions()), responseObserver); + getChannel().newCall(getClientStreamingRpcMethodHelper(), getCallOptions()), responseObserver); } /** @@ -314,7 +334,7 @@ public final class SimpleServiceGrpc { public void serverStreamingRpc(io.grpc.testing.protobuf.SimpleRequest request, io.grpc.stub.StreamObserver<io.grpc.testing.protobuf.SimpleResponse> responseObserver) { asyncServerStreamingCall( - getChannel().newCall(getServerStreamingRpcMethod(), getCallOptions()), request, responseObserver); + getChannel().newCall(getServerStreamingRpcMethodHelper(), getCallOptions()), request, responseObserver); } /** @@ -325,7 +345,7 @@ public final class SimpleServiceGrpc { public io.grpc.stub.StreamObserver<io.grpc.testing.protobuf.SimpleRequest> bidiStreamingRpc( io.grpc.stub.StreamObserver<io.grpc.testing.protobuf.SimpleResponse> responseObserver) { return asyncBidiStreamingCall( - getChannel().newCall(getBidiStreamingRpcMethod(), getCallOptions()), responseObserver); + getChannel().newCall(getBidiStreamingRpcMethodHelper(), getCallOptions()), responseObserver); } } @@ -357,7 +377,7 @@ public final class SimpleServiceGrpc { */ public io.grpc.testing.protobuf.SimpleResponse unaryRpc(io.grpc.testing.protobuf.SimpleRequest request) { return blockingUnaryCall( - getChannel(), getUnaryRpcMethod(), getCallOptions(), request); + getChannel(), getUnaryRpcMethodHelper(), getCallOptions(), request); } /** @@ -368,7 +388,7 @@ public final class SimpleServiceGrpc { public java.util.Iterator<io.grpc.testing.protobuf.SimpleResponse> serverStreamingRpc( io.grpc.testing.protobuf.SimpleRequest request) { return blockingServerStreamingCall( - getChannel(), getServerStreamingRpcMethod(), getCallOptions(), request); + getChannel(), getServerStreamingRpcMethodHelper(), getCallOptions(), request); } } @@ -401,7 +421,7 @@ public final class SimpleServiceGrpc { public com.google.common.util.concurrent.ListenableFuture<io.grpc.testing.protobuf.SimpleResponse> unaryRpc( io.grpc.testing.protobuf.SimpleRequest request) { return futureUnaryCall( - getChannel().newCall(getUnaryRpcMethod(), getCallOptions()), request); + getChannel().newCall(getUnaryRpcMethodHelper(), getCallOptions()), request); } } @@ -502,10 +522,10 @@ public final class SimpleServiceGrpc { if (result == null) { serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) .setSchemaDescriptor(new SimpleServiceFileDescriptorSupplier()) - .addMethod(getUnaryRpcMethod()) - .addMethod(getClientStreamingRpcMethod()) - .addMethod(getServerStreamingRpcMethod()) - .addMethod(getBidiStreamingRpcMethod()) + .addMethod(getUnaryRpcMethodHelper()) + .addMethod(getClientStreamingRpcMethodHelper()) + .addMethod(getServerStreamingRpcMethodHelper()) + .addMethod(getBidiStreamingRpcMethodHelper()) .build(); } } |