mirror of https://github.com/grpc/grpc-java.git
services: Proto reflection service
This commit is contained in:
parent
6c589e1933
commit
c8c9fff679
|
|
@ -131,9 +131,9 @@ subprojects {
|
|||
}
|
||||
}
|
||||
|
||||
compileJava {
|
||||
[compileJava, compileTestJava].each() {
|
||||
// Protobuf-generated code produces some warnings.
|
||||
options.compilerArgs += ["-Xlint:-cast"]
|
||||
it.options.compilerArgs += ["-Xlint:-cast"]
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -31,6 +31,9 @@
|
|||
|
||||
package io.grpc;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import javax.annotation.concurrent.ThreadSafe;
|
||||
|
||||
|
|
@ -41,6 +44,15 @@ import javax.annotation.concurrent.ThreadSafe;
|
|||
@ExperimentalApi("https://github.com/grpc/grpc-java/issues/933")
|
||||
public abstract class HandlerRegistry {
|
||||
|
||||
/**
|
||||
* Returns the {@link ServerServiceDefinition}s provided by the registry, or an empty list if not
|
||||
* supported by the implementation.
|
||||
*/
|
||||
@ExperimentalApi("https://github.com/grpc/grpc-java/issues/2222")
|
||||
public List<ServerServiceDefinition> getServices() {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
/**
|
||||
* Lookup a {@link ServerMethodDefinition} by its fully-qualified name.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -0,0 +1,43 @@
|
|||
/*
|
||||
* Copyright 2016, Google Inc. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
* met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above
|
||||
* copyright notice, this list of conditions and the following disclaimer
|
||||
* in the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
*
|
||||
* * Neither the name of Google Inc. nor the names of its
|
||||
* contributors may be used to endorse or promote products derived from
|
||||
* this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package io.grpc;
|
||||
|
||||
/**
|
||||
* Provides a callback method for a service to receive a reference to its server. The contract with
|
||||
* {@link ServerBuilder} is that this method will be called on all registered services implementing
|
||||
* the interface after build() has been called and before the {@link Server} instance is returned.
|
||||
*/
|
||||
@ExperimentalApi("https://github.com/grpc/grpc-java/issues/2222")
|
||||
public interface InternalNotifyOnServerBuild {
|
||||
/** Notifies the service that the server has been built. */
|
||||
void notifyOnBuild(Server server);
|
||||
}
|
||||
|
|
@ -32,6 +32,8 @@
|
|||
package io.grpc;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import javax.annotation.concurrent.ThreadSafe;
|
||||
|
|
@ -63,6 +65,15 @@ public abstract class Server {
|
|||
return -1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the services registered with the server, or an empty list if not supported by the
|
||||
* implementation.
|
||||
*/
|
||||
@ExperimentalApi("https://github.com/grpc/grpc-java/issues/2222")
|
||||
public List<ServerServiceDefinition> getServices() {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
/**
|
||||
* Initiates an orderly shutdown in which preexisting calls continue but new calls are rejected.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -79,10 +79,13 @@ public abstract class ServerBuilder<T extends ServerBuilder<T>> {
|
|||
public abstract T addService(ServerServiceDefinition service);
|
||||
|
||||
/**
|
||||
* Adds a service implementation to the handler registry.
|
||||
* Adds a service implementation to the handler registry. If bindableService implements
|
||||
* {@link InternalNotifyOnServerBuild}, the service will receive a reference to the generated
|
||||
* server instance upon build().
|
||||
*
|
||||
* @param bindableService BindableService object
|
||||
*/
|
||||
@ExperimentalApi("https://github.com/grpc/grpc-java/issues/2222")
|
||||
public abstract T addService(BindableService bindableService);
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ public final class ServiceDescriptor {
|
|||
/**
|
||||
* Returns a marshaller-specific object that provides additional information about the service.
|
||||
* For example, when using Protobuf this should generally be a
|
||||
* {@link io.grpc.protobuf.reflection.ProtoFileDescriptorWrapper}, when present.
|
||||
* {@link io.grpc.protobuf.ProtoFileDescriptorSupplier}, when present.
|
||||
*/
|
||||
@Nullable
|
||||
public Object getMarshallerDescriptor() {
|
||||
|
|
|
|||
|
|
@ -45,12 +45,15 @@ import io.grpc.Context;
|
|||
import io.grpc.DecompressorRegistry;
|
||||
import io.grpc.HandlerRegistry;
|
||||
import io.grpc.Internal;
|
||||
import io.grpc.InternalNotifyOnServerBuild;
|
||||
import io.grpc.ServerBuilder;
|
||||
import io.grpc.ServerMethodDefinition;
|
||||
import io.grpc.ServerServiceDefinition;
|
||||
import io.grpc.ServerTransportFilter;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.Executor;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
|
@ -64,6 +67,10 @@ public abstract class AbstractServerImplBuilder<T extends AbstractServerImplBuil
|
|||
extends ServerBuilder<T> {
|
||||
|
||||
private static final HandlerRegistry EMPTY_FALLBACK_REGISTRY = new HandlerRegistry() {
|
||||
@Override
|
||||
public List<ServerServiceDefinition> getServices() {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ServerMethodDefinition<?, ?> lookupMethod(String methodName,
|
||||
|
|
@ -78,6 +85,9 @@ public abstract class AbstractServerImplBuilder<T extends AbstractServerImplBuil
|
|||
private final ArrayList<ServerTransportFilter> transportFilters =
|
||||
new ArrayList<ServerTransportFilter>();
|
||||
|
||||
private final List<InternalNotifyOnServerBuild> notifyOnBuildList =
|
||||
new ArrayList<InternalNotifyOnServerBuild>();
|
||||
|
||||
@Nullable
|
||||
private HandlerRegistry fallbackRegistry;
|
||||
|
||||
|
|
@ -112,6 +122,9 @@ public abstract class AbstractServerImplBuilder<T extends AbstractServerImplBuil
|
|||
|
||||
@Override
|
||||
public final T addService(BindableService bindableService) {
|
||||
if (bindableService instanceof InternalNotifyOnServerBuild) {
|
||||
notifyOnBuildList.add((InternalNotifyOnServerBuild) bindableService);
|
||||
}
|
||||
return addService(bindableService.bindService());
|
||||
}
|
||||
|
||||
|
|
@ -152,7 +165,7 @@ public abstract class AbstractServerImplBuilder<T extends AbstractServerImplBuil
|
|||
@Override
|
||||
public ServerImpl build() {
|
||||
io.grpc.internal.InternalServer transportServer = buildTransportServer();
|
||||
return new ServerImpl(executor, registryBuilder.build(),
|
||||
ServerImpl server = new ServerImpl(executor, registryBuilder.build(),
|
||||
firstNonNull(fallbackRegistry, EMPTY_FALLBACK_REGISTRY), transportServer,
|
||||
Context.ROOT, firstNonNull(decompressorRegistry, DecompressorRegistry.getDefaultInstance()),
|
||||
firstNonNull(compressorRegistry, CompressorRegistry.getDefaultInstance()),
|
||||
|
|
@ -160,6 +173,10 @@ public abstract class AbstractServerImplBuilder<T extends AbstractServerImplBuil
|
|||
firstNonNull(censusFactory,
|
||||
firstNonNull(Census.getCensusContextFactory(), NoopCensusContextFactory.INSTANCE)),
|
||||
GrpcUtil.STOPWATCH_SUPPLIER);
|
||||
for (InternalNotifyOnServerBuild notifyTarget : notifyOnBuildList) {
|
||||
notifyTarget.notifyOnBuild(server);
|
||||
}
|
||||
return server;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -34,28 +34,43 @@ package io.grpc.internal;
|
|||
import io.grpc.ServerMethodDefinition;
|
||||
import io.grpc.ServerServiceDefinition;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
final class InternalHandlerRegistry {
|
||||
|
||||
private final List<ServerServiceDefinition> services;
|
||||
private final Map<String, ServerMethodDefinition<?, ?>> methods;
|
||||
|
||||
private InternalHandlerRegistry(Map<String, ServerMethodDefinition<?, ?>> methods) {
|
||||
private InternalHandlerRegistry(
|
||||
List<ServerServiceDefinition> services, Map<String, ServerMethodDefinition<?, ?>> methods) {
|
||||
this.services = services;
|
||||
this.methods = methods;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the service definitions in this registry.
|
||||
*/
|
||||
public List<ServerServiceDefinition> getServices() {
|
||||
return services;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
ServerMethodDefinition<?, ?> lookupMethod(String methodName) {
|
||||
return methods.get(methodName);
|
||||
}
|
||||
|
||||
static class Builder {
|
||||
|
||||
// Store per-service first, to make sure services are added/replaced atomically.
|
||||
private final HashMap<String, ServerServiceDefinition> services =
|
||||
new HashMap<String, ServerServiceDefinition>();
|
||||
new LinkedHashMap<String, ServerServiceDefinition>();
|
||||
|
||||
Builder addService(ServerServiceDefinition service) {
|
||||
services.put(service.getServiceDescriptor().getName(), service);
|
||||
|
|
@ -70,7 +85,9 @@ final class InternalHandlerRegistry {
|
|||
map.put(method.getMethodDescriptor().getFullMethodName(), method);
|
||||
}
|
||||
}
|
||||
return new InternalHandlerRegistry(Collections.unmodifiableMap(map));
|
||||
return new InternalHandlerRegistry(
|
||||
Collections.unmodifiableList(new ArrayList<ServerServiceDefinition>(services.values())),
|
||||
Collections.unmodifiableMap(map));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@ import io.grpc.HandlerRegistry;
|
|||
import io.grpc.Metadata;
|
||||
import io.grpc.ServerCall;
|
||||
import io.grpc.ServerMethodDefinition;
|
||||
import io.grpc.ServerServiceDefinition;
|
||||
import io.grpc.ServerTransportFilter;
|
||||
import io.grpc.Status;
|
||||
|
||||
|
|
@ -176,6 +177,22 @@ public final class ServerImpl extends io.grpc.Server {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ServerServiceDefinition> getServices() {
|
||||
List<ServerServiceDefinition> fallbackServices = fallbackRegistry.getServices();
|
||||
if (fallbackServices.isEmpty()) {
|
||||
return registry.getServices();
|
||||
} else {
|
||||
List<ServerServiceDefinition> registryServices = registry.getServices();
|
||||
int servicesCount = registryServices.size() + fallbackServices.size();
|
||||
List<ServerServiceDefinition> services =
|
||||
new ArrayList<ServerServiceDefinition>(servicesCount);
|
||||
services.addAll(registryServices);
|
||||
services.addAll(fallbackServices);
|
||||
return Collections.unmodifiableList(services);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Initiates an orderly shutdown in which preexisting calls continue but new calls are rejected.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -38,6 +38,9 @@ import io.grpc.MethodDescriptor;
|
|||
import io.grpc.ServerMethodDefinition;
|
||||
import io.grpc.ServerServiceDefinition;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.ConcurrentMap;
|
||||
|
||||
|
|
@ -82,6 +85,15 @@ public final class MutableHandlerRegistry extends HandlerRegistry {
|
|||
return services.remove(service.getServiceDescriptor().getName(), service);
|
||||
}
|
||||
|
||||
/**
|
||||
* Note: This does not necessarily return a consistent view of the map.
|
||||
*/
|
||||
@Override
|
||||
@ExperimentalApi("https://github.com/grpc/grpc-java/issues/2222")
|
||||
public List<ServerServiceDefinition> getServices() {
|
||||
return Collections.unmodifiableList(new ArrayList<ServerServiceDefinition>(services.values()));
|
||||
}
|
||||
|
||||
/**
|
||||
* Note: This does not actually honor the authority provided. It will, eventually in the future.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ description = "gRPC: Services"
|
|||
dependencies {
|
||||
compile project(':grpc-protobuf'),
|
||||
project(':grpc-stub')
|
||||
testCompile project(':grpc-testing')
|
||||
}
|
||||
|
||||
configureProtoCompilation()
|
||||
|
|
|
|||
|
|
@ -0,0 +1,216 @@
|
|||
package io.grpc.reflection.v1alpha;
|
||||
|
||||
import static io.grpc.stub.ClientCalls.asyncUnaryCall;
|
||||
import static io.grpc.stub.ClientCalls.asyncServerStreamingCall;
|
||||
import static io.grpc.stub.ClientCalls.asyncClientStreamingCall;
|
||||
import static io.grpc.stub.ClientCalls.asyncBidiStreamingCall;
|
||||
import static io.grpc.stub.ClientCalls.blockingUnaryCall;
|
||||
import static io.grpc.stub.ClientCalls.blockingServerStreamingCall;
|
||||
import static io.grpc.stub.ClientCalls.futureUnaryCall;
|
||||
import static io.grpc.MethodDescriptor.generateFullMethodName;
|
||||
import static io.grpc.stub.ServerCalls.asyncUnaryCall;
|
||||
import static io.grpc.stub.ServerCalls.asyncServerStreamingCall;
|
||||
import static io.grpc.stub.ServerCalls.asyncClientStreamingCall;
|
||||
import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall;
|
||||
import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall;
|
||||
import static io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall;
|
||||
|
||||
/**
|
||||
*/
|
||||
@javax.annotation.Generated(
|
||||
value = "by gRPC proto compiler (version 1.1.0-SNAPSHOT)",
|
||||
comments = "Source: io/grpc/reflection/v1alpha/reflection.proto")
|
||||
public class ServerReflectionGrpc {
|
||||
|
||||
private ServerReflectionGrpc() {}
|
||||
|
||||
public static final String SERVICE_NAME = "grpc.reflection.v1alpha.ServerReflection";
|
||||
|
||||
// Static method descriptors that strictly reflect the proto.
|
||||
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
|
||||
public static final io.grpc.MethodDescriptor<io.grpc.reflection.v1alpha.ServerReflectionRequest,
|
||||
io.grpc.reflection.v1alpha.ServerReflectionResponse> METHOD_SERVER_REFLECTION_INFO =
|
||||
io.grpc.MethodDescriptor.create(
|
||||
io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING,
|
||||
generateFullMethodName(
|
||||
"grpc.reflection.v1alpha.ServerReflection", "ServerReflectionInfo"),
|
||||
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.reflection.v1alpha.ServerReflectionRequest.getDefaultInstance()),
|
||||
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.reflection.v1alpha.ServerReflectionResponse.getDefaultInstance()));
|
||||
|
||||
/**
|
||||
* Creates a new async stub that supports all call types for the service
|
||||
*/
|
||||
public static ServerReflectionStub newStub(io.grpc.Channel channel) {
|
||||
return new ServerReflectionStub(channel);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
|
||||
*/
|
||||
public static ServerReflectionBlockingStub newBlockingStub(
|
||||
io.grpc.Channel channel) {
|
||||
return new ServerReflectionBlockingStub(channel);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new ListenableFuture-style stub that supports unary and streaming output calls on the service
|
||||
*/
|
||||
public static ServerReflectionFutureStub newFutureStub(
|
||||
io.grpc.Channel channel) {
|
||||
return new ServerReflectionFutureStub(channel);
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
public static abstract class ServerReflectionImplBase implements io.grpc.BindableService {
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The reflection service is structured as a bidirectional stream, ensuring
|
||||
* all related requests go to a single server.
|
||||
* </pre>
|
||||
*/
|
||||
public io.grpc.stub.StreamObserver<io.grpc.reflection.v1alpha.ServerReflectionRequest> serverReflectionInfo(
|
||||
io.grpc.stub.StreamObserver<io.grpc.reflection.v1alpha.ServerReflectionResponse> responseObserver) {
|
||||
return asyncUnimplementedStreamingCall(METHOD_SERVER_REFLECTION_INFO, responseObserver);
|
||||
}
|
||||
|
||||
@java.lang.Override public io.grpc.ServerServiceDefinition bindService() {
|
||||
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
|
||||
.addMethod(
|
||||
METHOD_SERVER_REFLECTION_INFO,
|
||||
asyncBidiStreamingCall(
|
||||
new MethodHandlers<
|
||||
io.grpc.reflection.v1alpha.ServerReflectionRequest,
|
||||
io.grpc.reflection.v1alpha.ServerReflectionResponse>(
|
||||
this, METHODID_SERVER_REFLECTION_INFO)))
|
||||
.build();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
public static final class ServerReflectionStub extends io.grpc.stub.AbstractStub<ServerReflectionStub> {
|
||||
private ServerReflectionStub(io.grpc.Channel channel) {
|
||||
super(channel);
|
||||
}
|
||||
|
||||
private ServerReflectionStub(io.grpc.Channel channel,
|
||||
io.grpc.CallOptions callOptions) {
|
||||
super(channel, callOptions);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
protected ServerReflectionStub build(io.grpc.Channel channel,
|
||||
io.grpc.CallOptions callOptions) {
|
||||
return new ServerReflectionStub(channel, callOptions);
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The reflection service is structured as a bidirectional stream, ensuring
|
||||
* all related requests go to a single server.
|
||||
* </pre>
|
||||
*/
|
||||
public io.grpc.stub.StreamObserver<io.grpc.reflection.v1alpha.ServerReflectionRequest> serverReflectionInfo(
|
||||
io.grpc.stub.StreamObserver<io.grpc.reflection.v1alpha.ServerReflectionResponse> responseObserver) {
|
||||
return asyncBidiStreamingCall(
|
||||
getChannel().newCall(METHOD_SERVER_REFLECTION_INFO, getCallOptions()), responseObserver);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
public static final class ServerReflectionBlockingStub extends io.grpc.stub.AbstractStub<ServerReflectionBlockingStub> {
|
||||
private ServerReflectionBlockingStub(io.grpc.Channel channel) {
|
||||
super(channel);
|
||||
}
|
||||
|
||||
private ServerReflectionBlockingStub(io.grpc.Channel channel,
|
||||
io.grpc.CallOptions callOptions) {
|
||||
super(channel, callOptions);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
protected ServerReflectionBlockingStub build(io.grpc.Channel channel,
|
||||
io.grpc.CallOptions callOptions) {
|
||||
return new ServerReflectionBlockingStub(channel, callOptions);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
public static final class ServerReflectionFutureStub extends io.grpc.stub.AbstractStub<ServerReflectionFutureStub> {
|
||||
private ServerReflectionFutureStub(io.grpc.Channel channel) {
|
||||
super(channel);
|
||||
}
|
||||
|
||||
private ServerReflectionFutureStub(io.grpc.Channel channel,
|
||||
io.grpc.CallOptions callOptions) {
|
||||
super(channel, callOptions);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
protected ServerReflectionFutureStub build(io.grpc.Channel channel,
|
||||
io.grpc.CallOptions callOptions) {
|
||||
return new ServerReflectionFutureStub(channel, callOptions);
|
||||
}
|
||||
}
|
||||
|
||||
private static final int METHODID_SERVER_REFLECTION_INFO = 0;
|
||||
|
||||
private static class MethodHandlers<Req, Resp> implements
|
||||
io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>,
|
||||
io.grpc.stub.ServerCalls.ServerStreamingMethod<Req, Resp>,
|
||||
io.grpc.stub.ServerCalls.ClientStreamingMethod<Req, Resp>,
|
||||
io.grpc.stub.ServerCalls.BidiStreamingMethod<Req, Resp> {
|
||||
private final ServerReflectionImplBase serviceImpl;
|
||||
private final int methodId;
|
||||
|
||||
public MethodHandlers(ServerReflectionImplBase serviceImpl, int methodId) {
|
||||
this.serviceImpl = serviceImpl;
|
||||
this.methodId = methodId;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
@java.lang.SuppressWarnings("unchecked")
|
||||
public void invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserver) {
|
||||
switch (methodId) {
|
||||
default:
|
||||
throw new AssertionError();
|
||||
}
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
@java.lang.SuppressWarnings("unchecked")
|
||||
public io.grpc.stub.StreamObserver<Req> invoke(
|
||||
io.grpc.stub.StreamObserver<Resp> responseObserver) {
|
||||
switch (methodId) {
|
||||
case METHODID_SERVER_REFLECTION_INFO:
|
||||
return (io.grpc.stub.StreamObserver<Req>) serviceImpl.serverReflectionInfo(
|
||||
(io.grpc.stub.StreamObserver<io.grpc.reflection.v1alpha.ServerReflectionResponse>) responseObserver);
|
||||
default:
|
||||
throw new AssertionError();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static final class ServerReflectionDescriptorSupplier implements io.grpc.protobuf.ProtoFileDescriptorSupplier {
|
||||
@java.lang.Override
|
||||
public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
|
||||
return io.grpc.reflection.v1alpha.ServerReflectionProto.getDescriptor();
|
||||
}
|
||||
}
|
||||
|
||||
private static io.grpc.ServiceDescriptor serviceDescriptor;
|
||||
|
||||
public static synchronized io.grpc.ServiceDescriptor getServiceDescriptor() {
|
||||
if (serviceDescriptor == null) {
|
||||
serviceDescriptor = new io.grpc.ServiceDescriptor(SERVICE_NAME,
|
||||
new ServerReflectionDescriptorSupplier(),
|
||||
METHOD_SERVER_REFLECTION_INFO);
|
||||
}
|
||||
|
||||
return serviceDescriptor;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,576 @@
|
|||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: io/grpc/reflection/v1alpha/reflection.proto
|
||||
|
||||
package io.grpc.reflection.v1alpha;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The error code and error message sent by the server when an error occurs.
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code grpc.reflection.v1alpha.ErrorResponse}
|
||||
*/
|
||||
public final class ErrorResponse extends
|
||||
com.google.protobuf.GeneratedMessageV3 implements
|
||||
// @@protoc_insertion_point(message_implements:grpc.reflection.v1alpha.ErrorResponse)
|
||||
ErrorResponseOrBuilder {
|
||||
// Use ErrorResponse.newBuilder() to construct.
|
||||
private ErrorResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
|
||||
super(builder);
|
||||
}
|
||||
private ErrorResponse() {
|
||||
errorCode_ = 0;
|
||||
errorMessage_ = "";
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public final com.google.protobuf.UnknownFieldSet
|
||||
getUnknownFields() {
|
||||
return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
|
||||
}
|
||||
private ErrorResponse(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
this();
|
||||
int mutable_bitField0_ = 0;
|
||||
try {
|
||||
boolean done = false;
|
||||
while (!done) {
|
||||
int tag = input.readTag();
|
||||
switch (tag) {
|
||||
case 0:
|
||||
done = true;
|
||||
break;
|
||||
default: {
|
||||
if (!input.skipField(tag)) {
|
||||
done = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 8: {
|
||||
|
||||
errorCode_ = input.readInt32();
|
||||
break;
|
||||
}
|
||||
case 18: {
|
||||
java.lang.String s = input.readStringRequireUtf8();
|
||||
|
||||
errorMessage_ = s;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||
throw e.setUnfinishedMessage(this);
|
||||
} catch (java.io.IOException e) {
|
||||
throw new com.google.protobuf.InvalidProtocolBufferException(
|
||||
e).setUnfinishedMessage(this);
|
||||
} finally {
|
||||
makeExtensionsImmutable();
|
||||
}
|
||||
}
|
||||
public static final com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptor() {
|
||||
return io.grpc.reflection.v1alpha.ServerReflectionProto.internal_static_grpc_reflection_v1alpha_ErrorResponse_descriptor;
|
||||
}
|
||||
|
||||
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internalGetFieldAccessorTable() {
|
||||
return io.grpc.reflection.v1alpha.ServerReflectionProto.internal_static_grpc_reflection_v1alpha_ErrorResponse_fieldAccessorTable
|
||||
.ensureFieldAccessorsInitialized(
|
||||
io.grpc.reflection.v1alpha.ErrorResponse.class, io.grpc.reflection.v1alpha.ErrorResponse.Builder.class);
|
||||
}
|
||||
|
||||
public static final int ERROR_CODE_FIELD_NUMBER = 1;
|
||||
private int errorCode_;
|
||||
/**
|
||||
* <pre>
|
||||
* This field uses the error codes defined in grpc::StatusCode.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional int32 error_code = 1;</code>
|
||||
*/
|
||||
public int getErrorCode() {
|
||||
return errorCode_;
|
||||
}
|
||||
|
||||
public static final int ERROR_MESSAGE_FIELD_NUMBER = 2;
|
||||
private volatile java.lang.Object errorMessage_;
|
||||
/**
|
||||
* <code>optional string error_message = 2;</code>
|
||||
*/
|
||||
public java.lang.String getErrorMessage() {
|
||||
java.lang.Object ref = errorMessage_;
|
||||
if (ref instanceof java.lang.String) {
|
||||
return (java.lang.String) ref;
|
||||
} else {
|
||||
com.google.protobuf.ByteString bs =
|
||||
(com.google.protobuf.ByteString) ref;
|
||||
java.lang.String s = bs.toStringUtf8();
|
||||
errorMessage_ = s;
|
||||
return s;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* <code>optional string error_message = 2;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getErrorMessageBytes() {
|
||||
java.lang.Object ref = errorMessage_;
|
||||
if (ref instanceof java.lang.String) {
|
||||
com.google.protobuf.ByteString b =
|
||||
com.google.protobuf.ByteString.copyFromUtf8(
|
||||
(java.lang.String) ref);
|
||||
errorMessage_ = b;
|
||||
return b;
|
||||
} else {
|
||||
return (com.google.protobuf.ByteString) ref;
|
||||
}
|
||||
}
|
||||
|
||||
private byte memoizedIsInitialized = -1;
|
||||
public final boolean isInitialized() {
|
||||
byte isInitialized = memoizedIsInitialized;
|
||||
if (isInitialized == 1) return true;
|
||||
if (isInitialized == 0) return false;
|
||||
|
||||
memoizedIsInitialized = 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
public void writeTo(com.google.protobuf.CodedOutputStream output)
|
||||
throws java.io.IOException {
|
||||
if (errorCode_ != 0) {
|
||||
output.writeInt32(1, errorCode_);
|
||||
}
|
||||
if (!getErrorMessageBytes().isEmpty()) {
|
||||
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, errorMessage_);
|
||||
}
|
||||
}
|
||||
|
||||
public int getSerializedSize() {
|
||||
int size = memoizedSize;
|
||||
if (size != -1) return size;
|
||||
|
||||
size = 0;
|
||||
if (errorCode_ != 0) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeInt32Size(1, errorCode_);
|
||||
}
|
||||
if (!getErrorMessageBytes().isEmpty()) {
|
||||
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, errorMessage_);
|
||||
}
|
||||
memoizedSize = size;
|
||||
return size;
|
||||
}
|
||||
|
||||
private static final long serialVersionUID = 0L;
|
||||
@java.lang.Override
|
||||
public boolean equals(final java.lang.Object obj) {
|
||||
if (obj == this) {
|
||||
return true;
|
||||
}
|
||||
if (!(obj instanceof io.grpc.reflection.v1alpha.ErrorResponse)) {
|
||||
return super.equals(obj);
|
||||
}
|
||||
io.grpc.reflection.v1alpha.ErrorResponse other = (io.grpc.reflection.v1alpha.ErrorResponse) obj;
|
||||
|
||||
boolean result = true;
|
||||
result = result && (getErrorCode()
|
||||
== other.getErrorCode());
|
||||
result = result && getErrorMessage()
|
||||
.equals(other.getErrorMessage());
|
||||
return result;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public int hashCode() {
|
||||
if (memoizedHashCode != 0) {
|
||||
return memoizedHashCode;
|
||||
}
|
||||
int hash = 41;
|
||||
hash = (19 * hash) + getDescriptorForType().hashCode();
|
||||
hash = (37 * hash) + ERROR_CODE_FIELD_NUMBER;
|
||||
hash = (53 * hash) + getErrorCode();
|
||||
hash = (37 * hash) + ERROR_MESSAGE_FIELD_NUMBER;
|
||||
hash = (53 * hash) + getErrorMessage().hashCode();
|
||||
hash = (29 * hash) + unknownFields.hashCode();
|
||||
memoizedHashCode = hash;
|
||||
return hash;
|
||||
}
|
||||
|
||||
public static io.grpc.reflection.v1alpha.ErrorResponse parseFrom(
|
||||
com.google.protobuf.ByteString data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static io.grpc.reflection.v1alpha.ErrorResponse parseFrom(
|
||||
com.google.protobuf.ByteString data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
public static io.grpc.reflection.v1alpha.ErrorResponse parseFrom(byte[] data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static io.grpc.reflection.v1alpha.ErrorResponse parseFrom(
|
||||
byte[] data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
public static io.grpc.reflection.v1alpha.ErrorResponse parseFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input);
|
||||
}
|
||||
public static io.grpc.reflection.v1alpha.ErrorResponse parseFrom(
|
||||
java.io.InputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
public static io.grpc.reflection.v1alpha.ErrorResponse parseDelimitedFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseDelimitedWithIOException(PARSER, input);
|
||||
}
|
||||
public static io.grpc.reflection.v1alpha.ErrorResponse parseDelimitedFrom(
|
||||
java.io.InputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
public static io.grpc.reflection.v1alpha.ErrorResponse parseFrom(
|
||||
com.google.protobuf.CodedInputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input);
|
||||
}
|
||||
public static io.grpc.reflection.v1alpha.ErrorResponse parseFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
|
||||
public Builder newBuilderForType() { return newBuilder(); }
|
||||
public static Builder newBuilder() {
|
||||
return DEFAULT_INSTANCE.toBuilder();
|
||||
}
|
||||
public static Builder newBuilder(io.grpc.reflection.v1alpha.ErrorResponse prototype) {
|
||||
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
|
||||
}
|
||||
public Builder toBuilder() {
|
||||
return this == DEFAULT_INSTANCE
|
||||
? new Builder() : new Builder().mergeFrom(this);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
protected Builder newBuilderForType(
|
||||
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
|
||||
Builder builder = new Builder(parent);
|
||||
return builder;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The error code and error message sent by the server when an error occurs.
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code grpc.reflection.v1alpha.ErrorResponse}
|
||||
*/
|
||||
public static final class Builder extends
|
||||
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
|
||||
// @@protoc_insertion_point(builder_implements:grpc.reflection.v1alpha.ErrorResponse)
|
||||
io.grpc.reflection.v1alpha.ErrorResponseOrBuilder {
|
||||
public static final com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptor() {
|
||||
return io.grpc.reflection.v1alpha.ServerReflectionProto.internal_static_grpc_reflection_v1alpha_ErrorResponse_descriptor;
|
||||
}
|
||||
|
||||
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internalGetFieldAccessorTable() {
|
||||
return io.grpc.reflection.v1alpha.ServerReflectionProto.internal_static_grpc_reflection_v1alpha_ErrorResponse_fieldAccessorTable
|
||||
.ensureFieldAccessorsInitialized(
|
||||
io.grpc.reflection.v1alpha.ErrorResponse.class, io.grpc.reflection.v1alpha.ErrorResponse.Builder.class);
|
||||
}
|
||||
|
||||
// Construct using io.grpc.reflection.v1alpha.ErrorResponse.newBuilder()
|
||||
private Builder() {
|
||||
maybeForceBuilderInitialization();
|
||||
}
|
||||
|
||||
private Builder(
|
||||
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
|
||||
super(parent);
|
||||
maybeForceBuilderInitialization();
|
||||
}
|
||||
private void maybeForceBuilderInitialization() {
|
||||
if (com.google.protobuf.GeneratedMessageV3
|
||||
.alwaysUseFieldBuilders) {
|
||||
}
|
||||
}
|
||||
public Builder clear() {
|
||||
super.clear();
|
||||
errorCode_ = 0;
|
||||
|
||||
errorMessage_ = "";
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
public com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptorForType() {
|
||||
return io.grpc.reflection.v1alpha.ServerReflectionProto.internal_static_grpc_reflection_v1alpha_ErrorResponse_descriptor;
|
||||
}
|
||||
|
||||
public io.grpc.reflection.v1alpha.ErrorResponse getDefaultInstanceForType() {
|
||||
return io.grpc.reflection.v1alpha.ErrorResponse.getDefaultInstance();
|
||||
}
|
||||
|
||||
public io.grpc.reflection.v1alpha.ErrorResponse build() {
|
||||
io.grpc.reflection.v1alpha.ErrorResponse result = buildPartial();
|
||||
if (!result.isInitialized()) {
|
||||
throw newUninitializedMessageException(result);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public io.grpc.reflection.v1alpha.ErrorResponse buildPartial() {
|
||||
io.grpc.reflection.v1alpha.ErrorResponse result = new io.grpc.reflection.v1alpha.ErrorResponse(this);
|
||||
result.errorCode_ = errorCode_;
|
||||
result.errorMessage_ = errorMessage_;
|
||||
onBuilt();
|
||||
return result;
|
||||
}
|
||||
|
||||
public Builder clone() {
|
||||
return (Builder) super.clone();
|
||||
}
|
||||
public Builder setField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||
Object value) {
|
||||
return (Builder) super.setField(field, value);
|
||||
}
|
||||
public Builder clearField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field) {
|
||||
return (Builder) super.clearField(field);
|
||||
}
|
||||
public Builder clearOneof(
|
||||
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
|
||||
return (Builder) super.clearOneof(oneof);
|
||||
}
|
||||
public Builder setRepeatedField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||
int index, Object value) {
|
||||
return (Builder) super.setRepeatedField(field, index, value);
|
||||
}
|
||||
public Builder addRepeatedField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||
Object value) {
|
||||
return (Builder) super.addRepeatedField(field, value);
|
||||
}
|
||||
public Builder mergeFrom(com.google.protobuf.Message other) {
|
||||
if (other instanceof io.grpc.reflection.v1alpha.ErrorResponse) {
|
||||
return mergeFrom((io.grpc.reflection.v1alpha.ErrorResponse)other);
|
||||
} else {
|
||||
super.mergeFrom(other);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
public Builder mergeFrom(io.grpc.reflection.v1alpha.ErrorResponse other) {
|
||||
if (other == io.grpc.reflection.v1alpha.ErrorResponse.getDefaultInstance()) return this;
|
||||
if (other.getErrorCode() != 0) {
|
||||
setErrorCode(other.getErrorCode());
|
||||
}
|
||||
if (!other.getErrorMessage().isEmpty()) {
|
||||
errorMessage_ = other.errorMessage_;
|
||||
onChanged();
|
||||
}
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
|
||||
public final boolean isInitialized() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public Builder mergeFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
io.grpc.reflection.v1alpha.ErrorResponse parsedMessage = null;
|
||||
try {
|
||||
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
|
||||
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||
parsedMessage = (io.grpc.reflection.v1alpha.ErrorResponse) e.getUnfinishedMessage();
|
||||
throw e.unwrapIOException();
|
||||
} finally {
|
||||
if (parsedMessage != null) {
|
||||
mergeFrom(parsedMessage);
|
||||
}
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
private int errorCode_ ;
|
||||
/**
|
||||
* <pre>
|
||||
* This field uses the error codes defined in grpc::StatusCode.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional int32 error_code = 1;</code>
|
||||
*/
|
||||
public int getErrorCode() {
|
||||
return errorCode_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* This field uses the error codes defined in grpc::StatusCode.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional int32 error_code = 1;</code>
|
||||
*/
|
||||
public Builder setErrorCode(int value) {
|
||||
|
||||
errorCode_ = value;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* This field uses the error codes defined in grpc::StatusCode.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional int32 error_code = 1;</code>
|
||||
*/
|
||||
public Builder clearErrorCode() {
|
||||
|
||||
errorCode_ = 0;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
|
||||
private java.lang.Object errorMessage_ = "";
|
||||
/**
|
||||
* <code>optional string error_message = 2;</code>
|
||||
*/
|
||||
public java.lang.String getErrorMessage() {
|
||||
java.lang.Object ref = errorMessage_;
|
||||
if (!(ref instanceof java.lang.String)) {
|
||||
com.google.protobuf.ByteString bs =
|
||||
(com.google.protobuf.ByteString) ref;
|
||||
java.lang.String s = bs.toStringUtf8();
|
||||
errorMessage_ = s;
|
||||
return s;
|
||||
} else {
|
||||
return (java.lang.String) ref;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* <code>optional string error_message = 2;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getErrorMessageBytes() {
|
||||
java.lang.Object ref = errorMessage_;
|
||||
if (ref instanceof String) {
|
||||
com.google.protobuf.ByteString b =
|
||||
com.google.protobuf.ByteString.copyFromUtf8(
|
||||
(java.lang.String) ref);
|
||||
errorMessage_ = b;
|
||||
return b;
|
||||
} else {
|
||||
return (com.google.protobuf.ByteString) ref;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* <code>optional string error_message = 2;</code>
|
||||
*/
|
||||
public Builder setErrorMessage(
|
||||
java.lang.String value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
|
||||
errorMessage_ = value;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>optional string error_message = 2;</code>
|
||||
*/
|
||||
public Builder clearErrorMessage() {
|
||||
|
||||
errorMessage_ = getDefaultInstance().getErrorMessage();
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>optional string error_message = 2;</code>
|
||||
*/
|
||||
public Builder setErrorMessageBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
checkByteStringIsUtf8(value);
|
||||
|
||||
errorMessage_ = value;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
public final Builder setUnknownFields(
|
||||
final com.google.protobuf.UnknownFieldSet unknownFields) {
|
||||
return this;
|
||||
}
|
||||
|
||||
public final Builder mergeUnknownFields(
|
||||
final com.google.protobuf.UnknownFieldSet unknownFields) {
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
// @@protoc_insertion_point(builder_scope:grpc.reflection.v1alpha.ErrorResponse)
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:grpc.reflection.v1alpha.ErrorResponse)
|
||||
private static final io.grpc.reflection.v1alpha.ErrorResponse DEFAULT_INSTANCE;
|
||||
static {
|
||||
DEFAULT_INSTANCE = new io.grpc.reflection.v1alpha.ErrorResponse();
|
||||
}
|
||||
|
||||
public static io.grpc.reflection.v1alpha.ErrorResponse getDefaultInstance() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
private static final com.google.protobuf.Parser<ErrorResponse>
|
||||
PARSER = new com.google.protobuf.AbstractParser<ErrorResponse>() {
|
||||
public ErrorResponse parsePartialFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return new ErrorResponse(input, extensionRegistry);
|
||||
}
|
||||
};
|
||||
|
||||
public static com.google.protobuf.Parser<ErrorResponse> parser() {
|
||||
return PARSER;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public com.google.protobuf.Parser<ErrorResponse> getParserForType() {
|
||||
return PARSER;
|
||||
}
|
||||
|
||||
public io.grpc.reflection.v1alpha.ErrorResponse getDefaultInstanceForType() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: io/grpc/reflection/v1alpha/reflection.proto
|
||||
|
||||
package io.grpc.reflection.v1alpha;
|
||||
|
||||
public interface ErrorResponseOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:grpc.reflection.v1alpha.ErrorResponse)
|
||||
com.google.protobuf.MessageOrBuilder {
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* This field uses the error codes defined in grpc::StatusCode.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional int32 error_code = 1;</code>
|
||||
*/
|
||||
int getErrorCode();
|
||||
|
||||
/**
|
||||
* <code>optional string error_message = 2;</code>
|
||||
*/
|
||||
java.lang.String getErrorMessage();
|
||||
/**
|
||||
* <code>optional string error_message = 2;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getErrorMessageBytes();
|
||||
}
|
||||
|
|
@ -0,0 +1,703 @@
|
|||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: io/grpc/reflection/v1alpha/reflection.proto
|
||||
|
||||
package io.grpc.reflection.v1alpha;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* A list of extension numbers sent by the server answering
|
||||
* all_extension_numbers_of_type request.
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code grpc.reflection.v1alpha.ExtensionNumberResponse}
|
||||
*/
|
||||
public final class ExtensionNumberResponse extends
|
||||
com.google.protobuf.GeneratedMessageV3 implements
|
||||
// @@protoc_insertion_point(message_implements:grpc.reflection.v1alpha.ExtensionNumberResponse)
|
||||
ExtensionNumberResponseOrBuilder {
|
||||
// Use ExtensionNumberResponse.newBuilder() to construct.
|
||||
private ExtensionNumberResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
|
||||
super(builder);
|
||||
}
|
||||
private ExtensionNumberResponse() {
|
||||
baseTypeName_ = "";
|
||||
extensionNumber_ = java.util.Collections.emptyList();
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public final com.google.protobuf.UnknownFieldSet
|
||||
getUnknownFields() {
|
||||
return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
|
||||
}
|
||||
private ExtensionNumberResponse(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
this();
|
||||
int mutable_bitField0_ = 0;
|
||||
try {
|
||||
boolean done = false;
|
||||
while (!done) {
|
||||
int tag = input.readTag();
|
||||
switch (tag) {
|
||||
case 0:
|
||||
done = true;
|
||||
break;
|
||||
default: {
|
||||
if (!input.skipField(tag)) {
|
||||
done = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 10: {
|
||||
java.lang.String s = input.readStringRequireUtf8();
|
||||
|
||||
baseTypeName_ = s;
|
||||
break;
|
||||
}
|
||||
case 16: {
|
||||
if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
|
||||
extensionNumber_ = new java.util.ArrayList<java.lang.Integer>();
|
||||
mutable_bitField0_ |= 0x00000002;
|
||||
}
|
||||
extensionNumber_.add(input.readInt32());
|
||||
break;
|
||||
}
|
||||
case 18: {
|
||||
int length = input.readRawVarint32();
|
||||
int limit = input.pushLimit(length);
|
||||
if (!((mutable_bitField0_ & 0x00000002) == 0x00000002) && input.getBytesUntilLimit() > 0) {
|
||||
extensionNumber_ = new java.util.ArrayList<java.lang.Integer>();
|
||||
mutable_bitField0_ |= 0x00000002;
|
||||
}
|
||||
while (input.getBytesUntilLimit() > 0) {
|
||||
extensionNumber_.add(input.readInt32());
|
||||
}
|
||||
input.popLimit(limit);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||
throw e.setUnfinishedMessage(this);
|
||||
} catch (java.io.IOException e) {
|
||||
throw new com.google.protobuf.InvalidProtocolBufferException(
|
||||
e).setUnfinishedMessage(this);
|
||||
} finally {
|
||||
if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
|
||||
extensionNumber_ = java.util.Collections.unmodifiableList(extensionNumber_);
|
||||
}
|
||||
makeExtensionsImmutable();
|
||||
}
|
||||
}
|
||||
public static final com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptor() {
|
||||
return io.grpc.reflection.v1alpha.ServerReflectionProto.internal_static_grpc_reflection_v1alpha_ExtensionNumberResponse_descriptor;
|
||||
}
|
||||
|
||||
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internalGetFieldAccessorTable() {
|
||||
return io.grpc.reflection.v1alpha.ServerReflectionProto.internal_static_grpc_reflection_v1alpha_ExtensionNumberResponse_fieldAccessorTable
|
||||
.ensureFieldAccessorsInitialized(
|
||||
io.grpc.reflection.v1alpha.ExtensionNumberResponse.class, io.grpc.reflection.v1alpha.ExtensionNumberResponse.Builder.class);
|
||||
}
|
||||
|
||||
private int bitField0_;
|
||||
public static final int BASE_TYPE_NAME_FIELD_NUMBER = 1;
|
||||
private volatile java.lang.Object baseTypeName_;
|
||||
/**
|
||||
* <pre>
|
||||
* Full name of the base type, including the package name. The format
|
||||
* is <package>.<type>
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string base_type_name = 1;</code>
|
||||
*/
|
||||
public java.lang.String getBaseTypeName() {
|
||||
java.lang.Object ref = baseTypeName_;
|
||||
if (ref instanceof java.lang.String) {
|
||||
return (java.lang.String) ref;
|
||||
} else {
|
||||
com.google.protobuf.ByteString bs =
|
||||
(com.google.protobuf.ByteString) ref;
|
||||
java.lang.String s = bs.toStringUtf8();
|
||||
baseTypeName_ = s;
|
||||
return s;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Full name of the base type, including the package name. The format
|
||||
* is <package>.<type>
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string base_type_name = 1;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getBaseTypeNameBytes() {
|
||||
java.lang.Object ref = baseTypeName_;
|
||||
if (ref instanceof java.lang.String) {
|
||||
com.google.protobuf.ByteString b =
|
||||
com.google.protobuf.ByteString.copyFromUtf8(
|
||||
(java.lang.String) ref);
|
||||
baseTypeName_ = b;
|
||||
return b;
|
||||
} else {
|
||||
return (com.google.protobuf.ByteString) ref;
|
||||
}
|
||||
}
|
||||
|
||||
public static final int EXTENSION_NUMBER_FIELD_NUMBER = 2;
|
||||
private java.util.List<java.lang.Integer> extensionNumber_;
|
||||
/**
|
||||
* <code>repeated int32 extension_number = 2;</code>
|
||||
*/
|
||||
public java.util.List<java.lang.Integer>
|
||||
getExtensionNumberList() {
|
||||
return extensionNumber_;
|
||||
}
|
||||
/**
|
||||
* <code>repeated int32 extension_number = 2;</code>
|
||||
*/
|
||||
public int getExtensionNumberCount() {
|
||||
return extensionNumber_.size();
|
||||
}
|
||||
/**
|
||||
* <code>repeated int32 extension_number = 2;</code>
|
||||
*/
|
||||
public int getExtensionNumber(int index) {
|
||||
return extensionNumber_.get(index);
|
||||
}
|
||||
private int extensionNumberMemoizedSerializedSize = -1;
|
||||
|
||||
private byte memoizedIsInitialized = -1;
|
||||
public final boolean isInitialized() {
|
||||
byte isInitialized = memoizedIsInitialized;
|
||||
if (isInitialized == 1) return true;
|
||||
if (isInitialized == 0) return false;
|
||||
|
||||
memoizedIsInitialized = 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
public void writeTo(com.google.protobuf.CodedOutputStream output)
|
||||
throws java.io.IOException {
|
||||
getSerializedSize();
|
||||
if (!getBaseTypeNameBytes().isEmpty()) {
|
||||
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, baseTypeName_);
|
||||
}
|
||||
if (getExtensionNumberList().size() > 0) {
|
||||
output.writeUInt32NoTag(18);
|
||||
output.writeUInt32NoTag(extensionNumberMemoizedSerializedSize);
|
||||
}
|
||||
for (int i = 0; i < extensionNumber_.size(); i++) {
|
||||
output.writeInt32NoTag(extensionNumber_.get(i));
|
||||
}
|
||||
}
|
||||
|
||||
public int getSerializedSize() {
|
||||
int size = memoizedSize;
|
||||
if (size != -1) return size;
|
||||
|
||||
size = 0;
|
||||
if (!getBaseTypeNameBytes().isEmpty()) {
|
||||
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, baseTypeName_);
|
||||
}
|
||||
{
|
||||
int dataSize = 0;
|
||||
for (int i = 0; i < extensionNumber_.size(); i++) {
|
||||
dataSize += com.google.protobuf.CodedOutputStream
|
||||
.computeInt32SizeNoTag(extensionNumber_.get(i));
|
||||
}
|
||||
size += dataSize;
|
||||
if (!getExtensionNumberList().isEmpty()) {
|
||||
size += 1;
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeInt32SizeNoTag(dataSize);
|
||||
}
|
||||
extensionNumberMemoizedSerializedSize = dataSize;
|
||||
}
|
||||
memoizedSize = size;
|
||||
return size;
|
||||
}
|
||||
|
||||
private static final long serialVersionUID = 0L;
|
||||
@java.lang.Override
|
||||
public boolean equals(final java.lang.Object obj) {
|
||||
if (obj == this) {
|
||||
return true;
|
||||
}
|
||||
if (!(obj instanceof io.grpc.reflection.v1alpha.ExtensionNumberResponse)) {
|
||||
return super.equals(obj);
|
||||
}
|
||||
io.grpc.reflection.v1alpha.ExtensionNumberResponse other = (io.grpc.reflection.v1alpha.ExtensionNumberResponse) obj;
|
||||
|
||||
boolean result = true;
|
||||
result = result && getBaseTypeName()
|
||||
.equals(other.getBaseTypeName());
|
||||
result = result && getExtensionNumberList()
|
||||
.equals(other.getExtensionNumberList());
|
||||
return result;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public int hashCode() {
|
||||
if (memoizedHashCode != 0) {
|
||||
return memoizedHashCode;
|
||||
}
|
||||
int hash = 41;
|
||||
hash = (19 * hash) + getDescriptorForType().hashCode();
|
||||
hash = (37 * hash) + BASE_TYPE_NAME_FIELD_NUMBER;
|
||||
hash = (53 * hash) + getBaseTypeName().hashCode();
|
||||
if (getExtensionNumberCount() > 0) {
|
||||
hash = (37 * hash) + EXTENSION_NUMBER_FIELD_NUMBER;
|
||||
hash = (53 * hash) + getExtensionNumberList().hashCode();
|
||||
}
|
||||
hash = (29 * hash) + unknownFields.hashCode();
|
||||
memoizedHashCode = hash;
|
||||
return hash;
|
||||
}
|
||||
|
||||
public static io.grpc.reflection.v1alpha.ExtensionNumberResponse parseFrom(
|
||||
com.google.protobuf.ByteString data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static io.grpc.reflection.v1alpha.ExtensionNumberResponse parseFrom(
|
||||
com.google.protobuf.ByteString data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
public static io.grpc.reflection.v1alpha.ExtensionNumberResponse parseFrom(byte[] data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static io.grpc.reflection.v1alpha.ExtensionNumberResponse parseFrom(
|
||||
byte[] data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
public static io.grpc.reflection.v1alpha.ExtensionNumberResponse parseFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input);
|
||||
}
|
||||
public static io.grpc.reflection.v1alpha.ExtensionNumberResponse parseFrom(
|
||||
java.io.InputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
public static io.grpc.reflection.v1alpha.ExtensionNumberResponse parseDelimitedFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseDelimitedWithIOException(PARSER, input);
|
||||
}
|
||||
public static io.grpc.reflection.v1alpha.ExtensionNumberResponse parseDelimitedFrom(
|
||||
java.io.InputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
public static io.grpc.reflection.v1alpha.ExtensionNumberResponse parseFrom(
|
||||
com.google.protobuf.CodedInputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input);
|
||||
}
|
||||
public static io.grpc.reflection.v1alpha.ExtensionNumberResponse parseFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
|
||||
public Builder newBuilderForType() { return newBuilder(); }
|
||||
public static Builder newBuilder() {
|
||||
return DEFAULT_INSTANCE.toBuilder();
|
||||
}
|
||||
public static Builder newBuilder(io.grpc.reflection.v1alpha.ExtensionNumberResponse prototype) {
|
||||
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
|
||||
}
|
||||
public Builder toBuilder() {
|
||||
return this == DEFAULT_INSTANCE
|
||||
? new Builder() : new Builder().mergeFrom(this);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
protected Builder newBuilderForType(
|
||||
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
|
||||
Builder builder = new Builder(parent);
|
||||
return builder;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A list of extension numbers sent by the server answering
|
||||
* all_extension_numbers_of_type request.
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code grpc.reflection.v1alpha.ExtensionNumberResponse}
|
||||
*/
|
||||
public static final class Builder extends
|
||||
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
|
||||
// @@protoc_insertion_point(builder_implements:grpc.reflection.v1alpha.ExtensionNumberResponse)
|
||||
io.grpc.reflection.v1alpha.ExtensionNumberResponseOrBuilder {
|
||||
public static final com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptor() {
|
||||
return io.grpc.reflection.v1alpha.ServerReflectionProto.internal_static_grpc_reflection_v1alpha_ExtensionNumberResponse_descriptor;
|
||||
}
|
||||
|
||||
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internalGetFieldAccessorTable() {
|
||||
return io.grpc.reflection.v1alpha.ServerReflectionProto.internal_static_grpc_reflection_v1alpha_ExtensionNumberResponse_fieldAccessorTable
|
||||
.ensureFieldAccessorsInitialized(
|
||||
io.grpc.reflection.v1alpha.ExtensionNumberResponse.class, io.grpc.reflection.v1alpha.ExtensionNumberResponse.Builder.class);
|
||||
}
|
||||
|
||||
// Construct using io.grpc.reflection.v1alpha.ExtensionNumberResponse.newBuilder()
|
||||
private Builder() {
|
||||
maybeForceBuilderInitialization();
|
||||
}
|
||||
|
||||
private Builder(
|
||||
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
|
||||
super(parent);
|
||||
maybeForceBuilderInitialization();
|
||||
}
|
||||
private void maybeForceBuilderInitialization() {
|
||||
if (com.google.protobuf.GeneratedMessageV3
|
||||
.alwaysUseFieldBuilders) {
|
||||
}
|
||||
}
|
||||
public Builder clear() {
|
||||
super.clear();
|
||||
baseTypeName_ = "";
|
||||
|
||||
extensionNumber_ = java.util.Collections.emptyList();
|
||||
bitField0_ = (bitField0_ & ~0x00000002);
|
||||
return this;
|
||||
}
|
||||
|
||||
public com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptorForType() {
|
||||
return io.grpc.reflection.v1alpha.ServerReflectionProto.internal_static_grpc_reflection_v1alpha_ExtensionNumberResponse_descriptor;
|
||||
}
|
||||
|
||||
public io.grpc.reflection.v1alpha.ExtensionNumberResponse getDefaultInstanceForType() {
|
||||
return io.grpc.reflection.v1alpha.ExtensionNumberResponse.getDefaultInstance();
|
||||
}
|
||||
|
||||
public io.grpc.reflection.v1alpha.ExtensionNumberResponse build() {
|
||||
io.grpc.reflection.v1alpha.ExtensionNumberResponse result = buildPartial();
|
||||
if (!result.isInitialized()) {
|
||||
throw newUninitializedMessageException(result);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public io.grpc.reflection.v1alpha.ExtensionNumberResponse buildPartial() {
|
||||
io.grpc.reflection.v1alpha.ExtensionNumberResponse result = new io.grpc.reflection.v1alpha.ExtensionNumberResponse(this);
|
||||
int from_bitField0_ = bitField0_;
|
||||
int to_bitField0_ = 0;
|
||||
result.baseTypeName_ = baseTypeName_;
|
||||
if (((bitField0_ & 0x00000002) == 0x00000002)) {
|
||||
extensionNumber_ = java.util.Collections.unmodifiableList(extensionNumber_);
|
||||
bitField0_ = (bitField0_ & ~0x00000002);
|
||||
}
|
||||
result.extensionNumber_ = extensionNumber_;
|
||||
result.bitField0_ = to_bitField0_;
|
||||
onBuilt();
|
||||
return result;
|
||||
}
|
||||
|
||||
public Builder clone() {
|
||||
return (Builder) super.clone();
|
||||
}
|
||||
public Builder setField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||
Object value) {
|
||||
return (Builder) super.setField(field, value);
|
||||
}
|
||||
public Builder clearField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field) {
|
||||
return (Builder) super.clearField(field);
|
||||
}
|
||||
public Builder clearOneof(
|
||||
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
|
||||
return (Builder) super.clearOneof(oneof);
|
||||
}
|
||||
public Builder setRepeatedField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||
int index, Object value) {
|
||||
return (Builder) super.setRepeatedField(field, index, value);
|
||||
}
|
||||
public Builder addRepeatedField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||
Object value) {
|
||||
return (Builder) super.addRepeatedField(field, value);
|
||||
}
|
||||
public Builder mergeFrom(com.google.protobuf.Message other) {
|
||||
if (other instanceof io.grpc.reflection.v1alpha.ExtensionNumberResponse) {
|
||||
return mergeFrom((io.grpc.reflection.v1alpha.ExtensionNumberResponse)other);
|
||||
} else {
|
||||
super.mergeFrom(other);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
public Builder mergeFrom(io.grpc.reflection.v1alpha.ExtensionNumberResponse other) {
|
||||
if (other == io.grpc.reflection.v1alpha.ExtensionNumberResponse.getDefaultInstance()) return this;
|
||||
if (!other.getBaseTypeName().isEmpty()) {
|
||||
baseTypeName_ = other.baseTypeName_;
|
||||
onChanged();
|
||||
}
|
||||
if (!other.extensionNumber_.isEmpty()) {
|
||||
if (extensionNumber_.isEmpty()) {
|
||||
extensionNumber_ = other.extensionNumber_;
|
||||
bitField0_ = (bitField0_ & ~0x00000002);
|
||||
} else {
|
||||
ensureExtensionNumberIsMutable();
|
||||
extensionNumber_.addAll(other.extensionNumber_);
|
||||
}
|
||||
onChanged();
|
||||
}
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
|
||||
public final boolean isInitialized() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public Builder mergeFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
io.grpc.reflection.v1alpha.ExtensionNumberResponse parsedMessage = null;
|
||||
try {
|
||||
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
|
||||
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||
parsedMessage = (io.grpc.reflection.v1alpha.ExtensionNumberResponse) e.getUnfinishedMessage();
|
||||
throw e.unwrapIOException();
|
||||
} finally {
|
||||
if (parsedMessage != null) {
|
||||
mergeFrom(parsedMessage);
|
||||
}
|
||||
}
|
||||
return this;
|
||||
}
|
||||
private int bitField0_;
|
||||
|
||||
private java.lang.Object baseTypeName_ = "";
|
||||
/**
|
||||
* <pre>
|
||||
* Full name of the base type, including the package name. The format
|
||||
* is <package>.<type>
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string base_type_name = 1;</code>
|
||||
*/
|
||||
public java.lang.String getBaseTypeName() {
|
||||
java.lang.Object ref = baseTypeName_;
|
||||
if (!(ref instanceof java.lang.String)) {
|
||||
com.google.protobuf.ByteString bs =
|
||||
(com.google.protobuf.ByteString) ref;
|
||||
java.lang.String s = bs.toStringUtf8();
|
||||
baseTypeName_ = s;
|
||||
return s;
|
||||
} else {
|
||||
return (java.lang.String) ref;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Full name of the base type, including the package name. The format
|
||||
* is <package>.<type>
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string base_type_name = 1;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getBaseTypeNameBytes() {
|
||||
java.lang.Object ref = baseTypeName_;
|
||||
if (ref instanceof String) {
|
||||
com.google.protobuf.ByteString b =
|
||||
com.google.protobuf.ByteString.copyFromUtf8(
|
||||
(java.lang.String) ref);
|
||||
baseTypeName_ = b;
|
||||
return b;
|
||||
} else {
|
||||
return (com.google.protobuf.ByteString) ref;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Full name of the base type, including the package name. The format
|
||||
* is <package>.<type>
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string base_type_name = 1;</code>
|
||||
*/
|
||||
public Builder setBaseTypeName(
|
||||
java.lang.String value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
|
||||
baseTypeName_ = value;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Full name of the base type, including the package name. The format
|
||||
* is <package>.<type>
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string base_type_name = 1;</code>
|
||||
*/
|
||||
public Builder clearBaseTypeName() {
|
||||
|
||||
baseTypeName_ = getDefaultInstance().getBaseTypeName();
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Full name of the base type, including the package name. The format
|
||||
* is <package>.<type>
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string base_type_name = 1;</code>
|
||||
*/
|
||||
public Builder setBaseTypeNameBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
checkByteStringIsUtf8(value);
|
||||
|
||||
baseTypeName_ = value;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
|
||||
private java.util.List<java.lang.Integer> extensionNumber_ = java.util.Collections.emptyList();
|
||||
private void ensureExtensionNumberIsMutable() {
|
||||
if (!((bitField0_ & 0x00000002) == 0x00000002)) {
|
||||
extensionNumber_ = new java.util.ArrayList<java.lang.Integer>(extensionNumber_);
|
||||
bitField0_ |= 0x00000002;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* <code>repeated int32 extension_number = 2;</code>
|
||||
*/
|
||||
public java.util.List<java.lang.Integer>
|
||||
getExtensionNumberList() {
|
||||
return java.util.Collections.unmodifiableList(extensionNumber_);
|
||||
}
|
||||
/**
|
||||
* <code>repeated int32 extension_number = 2;</code>
|
||||
*/
|
||||
public int getExtensionNumberCount() {
|
||||
return extensionNumber_.size();
|
||||
}
|
||||
/**
|
||||
* <code>repeated int32 extension_number = 2;</code>
|
||||
*/
|
||||
public int getExtensionNumber(int index) {
|
||||
return extensionNumber_.get(index);
|
||||
}
|
||||
/**
|
||||
* <code>repeated int32 extension_number = 2;</code>
|
||||
*/
|
||||
public Builder setExtensionNumber(
|
||||
int index, int value) {
|
||||
ensureExtensionNumberIsMutable();
|
||||
extensionNumber_.set(index, value);
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>repeated int32 extension_number = 2;</code>
|
||||
*/
|
||||
public Builder addExtensionNumber(int value) {
|
||||
ensureExtensionNumberIsMutable();
|
||||
extensionNumber_.add(value);
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>repeated int32 extension_number = 2;</code>
|
||||
*/
|
||||
public Builder addAllExtensionNumber(
|
||||
java.lang.Iterable<? extends java.lang.Integer> values) {
|
||||
ensureExtensionNumberIsMutable();
|
||||
com.google.protobuf.AbstractMessageLite.Builder.addAll(
|
||||
values, extensionNumber_);
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>repeated int32 extension_number = 2;</code>
|
||||
*/
|
||||
public Builder clearExtensionNumber() {
|
||||
extensionNumber_ = java.util.Collections.emptyList();
|
||||
bitField0_ = (bitField0_ & ~0x00000002);
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
public final Builder setUnknownFields(
|
||||
final com.google.protobuf.UnknownFieldSet unknownFields) {
|
||||
return this;
|
||||
}
|
||||
|
||||
public final Builder mergeUnknownFields(
|
||||
final com.google.protobuf.UnknownFieldSet unknownFields) {
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
// @@protoc_insertion_point(builder_scope:grpc.reflection.v1alpha.ExtensionNumberResponse)
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:grpc.reflection.v1alpha.ExtensionNumberResponse)
|
||||
private static final io.grpc.reflection.v1alpha.ExtensionNumberResponse DEFAULT_INSTANCE;
|
||||
static {
|
||||
DEFAULT_INSTANCE = new io.grpc.reflection.v1alpha.ExtensionNumberResponse();
|
||||
}
|
||||
|
||||
public static io.grpc.reflection.v1alpha.ExtensionNumberResponse getDefaultInstance() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
private static final com.google.protobuf.Parser<ExtensionNumberResponse>
|
||||
PARSER = new com.google.protobuf.AbstractParser<ExtensionNumberResponse>() {
|
||||
public ExtensionNumberResponse parsePartialFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return new ExtensionNumberResponse(input, extensionRegistry);
|
||||
}
|
||||
};
|
||||
|
||||
public static com.google.protobuf.Parser<ExtensionNumberResponse> parser() {
|
||||
return PARSER;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public com.google.protobuf.Parser<ExtensionNumberResponse> getParserForType() {
|
||||
return PARSER;
|
||||
}
|
||||
|
||||
public io.grpc.reflection.v1alpha.ExtensionNumberResponse getDefaultInstanceForType() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: io/grpc/reflection/v1alpha/reflection.proto
|
||||
|
||||
package io.grpc.reflection.v1alpha;
|
||||
|
||||
public interface ExtensionNumberResponseOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:grpc.reflection.v1alpha.ExtensionNumberResponse)
|
||||
com.google.protobuf.MessageOrBuilder {
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Full name of the base type, including the package name. The format
|
||||
* is <package>.<type>
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string base_type_name = 1;</code>
|
||||
*/
|
||||
java.lang.String getBaseTypeName();
|
||||
/**
|
||||
* <pre>
|
||||
* Full name of the base type, including the package name. The format
|
||||
* is <package>.<type>
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string base_type_name = 1;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getBaseTypeNameBytes();
|
||||
|
||||
/**
|
||||
* <code>repeated int32 extension_number = 2;</code>
|
||||
*/
|
||||
java.util.List<java.lang.Integer> getExtensionNumberList();
|
||||
/**
|
||||
* <code>repeated int32 extension_number = 2;</code>
|
||||
*/
|
||||
int getExtensionNumberCount();
|
||||
/**
|
||||
* <code>repeated int32 extension_number = 2;</code>
|
||||
*/
|
||||
int getExtensionNumber(int index);
|
||||
}
|
||||
|
|
@ -0,0 +1,590 @@
|
|||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: io/grpc/reflection/v1alpha/reflection.proto
|
||||
|
||||
package io.grpc.reflection.v1alpha;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The type name and extension number sent by the client when requesting
|
||||
* file_containing_extension.
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code grpc.reflection.v1alpha.ExtensionRequest}
|
||||
*/
|
||||
public final class ExtensionRequest extends
|
||||
com.google.protobuf.GeneratedMessageV3 implements
|
||||
// @@protoc_insertion_point(message_implements:grpc.reflection.v1alpha.ExtensionRequest)
|
||||
ExtensionRequestOrBuilder {
|
||||
// Use ExtensionRequest.newBuilder() to construct.
|
||||
private ExtensionRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
|
||||
super(builder);
|
||||
}
|
||||
private ExtensionRequest() {
|
||||
containingType_ = "";
|
||||
extensionNumber_ = 0;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public final com.google.protobuf.UnknownFieldSet
|
||||
getUnknownFields() {
|
||||
return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
|
||||
}
|
||||
private ExtensionRequest(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
this();
|
||||
int mutable_bitField0_ = 0;
|
||||
try {
|
||||
boolean done = false;
|
||||
while (!done) {
|
||||
int tag = input.readTag();
|
||||
switch (tag) {
|
||||
case 0:
|
||||
done = true;
|
||||
break;
|
||||
default: {
|
||||
if (!input.skipField(tag)) {
|
||||
done = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 10: {
|
||||
java.lang.String s = input.readStringRequireUtf8();
|
||||
|
||||
containingType_ = s;
|
||||
break;
|
||||
}
|
||||
case 16: {
|
||||
|
||||
extensionNumber_ = input.readInt32();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||
throw e.setUnfinishedMessage(this);
|
||||
} catch (java.io.IOException e) {
|
||||
throw new com.google.protobuf.InvalidProtocolBufferException(
|
||||
e).setUnfinishedMessage(this);
|
||||
} finally {
|
||||
makeExtensionsImmutable();
|
||||
}
|
||||
}
|
||||
public static final com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptor() {
|
||||
return io.grpc.reflection.v1alpha.ServerReflectionProto.internal_static_grpc_reflection_v1alpha_ExtensionRequest_descriptor;
|
||||
}
|
||||
|
||||
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internalGetFieldAccessorTable() {
|
||||
return io.grpc.reflection.v1alpha.ServerReflectionProto.internal_static_grpc_reflection_v1alpha_ExtensionRequest_fieldAccessorTable
|
||||
.ensureFieldAccessorsInitialized(
|
||||
io.grpc.reflection.v1alpha.ExtensionRequest.class, io.grpc.reflection.v1alpha.ExtensionRequest.Builder.class);
|
||||
}
|
||||
|
||||
public static final int CONTAINING_TYPE_FIELD_NUMBER = 1;
|
||||
private volatile java.lang.Object containingType_;
|
||||
/**
|
||||
* <pre>
|
||||
* Fully-qualified type name. The format should be <package>.<type>
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string containing_type = 1;</code>
|
||||
*/
|
||||
public java.lang.String getContainingType() {
|
||||
java.lang.Object ref = containingType_;
|
||||
if (ref instanceof java.lang.String) {
|
||||
return (java.lang.String) ref;
|
||||
} else {
|
||||
com.google.protobuf.ByteString bs =
|
||||
(com.google.protobuf.ByteString) ref;
|
||||
java.lang.String s = bs.toStringUtf8();
|
||||
containingType_ = s;
|
||||
return s;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Fully-qualified type name. The format should be <package>.<type>
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string containing_type = 1;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getContainingTypeBytes() {
|
||||
java.lang.Object ref = containingType_;
|
||||
if (ref instanceof java.lang.String) {
|
||||
com.google.protobuf.ByteString b =
|
||||
com.google.protobuf.ByteString.copyFromUtf8(
|
||||
(java.lang.String) ref);
|
||||
containingType_ = b;
|
||||
return b;
|
||||
} else {
|
||||
return (com.google.protobuf.ByteString) ref;
|
||||
}
|
||||
}
|
||||
|
||||
public static final int EXTENSION_NUMBER_FIELD_NUMBER = 2;
|
||||
private int extensionNumber_;
|
||||
/**
|
||||
* <code>optional int32 extension_number = 2;</code>
|
||||
*/
|
||||
public int getExtensionNumber() {
|
||||
return extensionNumber_;
|
||||
}
|
||||
|
||||
private byte memoizedIsInitialized = -1;
|
||||
public final boolean isInitialized() {
|
||||
byte isInitialized = memoizedIsInitialized;
|
||||
if (isInitialized == 1) return true;
|
||||
if (isInitialized == 0) return false;
|
||||
|
||||
memoizedIsInitialized = 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
public void writeTo(com.google.protobuf.CodedOutputStream output)
|
||||
throws java.io.IOException {
|
||||
if (!getContainingTypeBytes().isEmpty()) {
|
||||
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, containingType_);
|
||||
}
|
||||
if (extensionNumber_ != 0) {
|
||||
output.writeInt32(2, extensionNumber_);
|
||||
}
|
||||
}
|
||||
|
||||
public int getSerializedSize() {
|
||||
int size = memoizedSize;
|
||||
if (size != -1) return size;
|
||||
|
||||
size = 0;
|
||||
if (!getContainingTypeBytes().isEmpty()) {
|
||||
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, containingType_);
|
||||
}
|
||||
if (extensionNumber_ != 0) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeInt32Size(2, extensionNumber_);
|
||||
}
|
||||
memoizedSize = size;
|
||||
return size;
|
||||
}
|
||||
|
||||
private static final long serialVersionUID = 0L;
|
||||
@java.lang.Override
|
||||
public boolean equals(final java.lang.Object obj) {
|
||||
if (obj == this) {
|
||||
return true;
|
||||
}
|
||||
if (!(obj instanceof io.grpc.reflection.v1alpha.ExtensionRequest)) {
|
||||
return super.equals(obj);
|
||||
}
|
||||
io.grpc.reflection.v1alpha.ExtensionRequest other = (io.grpc.reflection.v1alpha.ExtensionRequest) obj;
|
||||
|
||||
boolean result = true;
|
||||
result = result && getContainingType()
|
||||
.equals(other.getContainingType());
|
||||
result = result && (getExtensionNumber()
|
||||
== other.getExtensionNumber());
|
||||
return result;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public int hashCode() {
|
||||
if (memoizedHashCode != 0) {
|
||||
return memoizedHashCode;
|
||||
}
|
||||
int hash = 41;
|
||||
hash = (19 * hash) + getDescriptorForType().hashCode();
|
||||
hash = (37 * hash) + CONTAINING_TYPE_FIELD_NUMBER;
|
||||
hash = (53 * hash) + getContainingType().hashCode();
|
||||
hash = (37 * hash) + EXTENSION_NUMBER_FIELD_NUMBER;
|
||||
hash = (53 * hash) + getExtensionNumber();
|
||||
hash = (29 * hash) + unknownFields.hashCode();
|
||||
memoizedHashCode = hash;
|
||||
return hash;
|
||||
}
|
||||
|
||||
public static io.grpc.reflection.v1alpha.ExtensionRequest parseFrom(
|
||||
com.google.protobuf.ByteString data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static io.grpc.reflection.v1alpha.ExtensionRequest parseFrom(
|
||||
com.google.protobuf.ByteString data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
public static io.grpc.reflection.v1alpha.ExtensionRequest parseFrom(byte[] data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static io.grpc.reflection.v1alpha.ExtensionRequest parseFrom(
|
||||
byte[] data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
public static io.grpc.reflection.v1alpha.ExtensionRequest parseFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input);
|
||||
}
|
||||
public static io.grpc.reflection.v1alpha.ExtensionRequest parseFrom(
|
||||
java.io.InputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
public static io.grpc.reflection.v1alpha.ExtensionRequest parseDelimitedFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseDelimitedWithIOException(PARSER, input);
|
||||
}
|
||||
public static io.grpc.reflection.v1alpha.ExtensionRequest parseDelimitedFrom(
|
||||
java.io.InputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
public static io.grpc.reflection.v1alpha.ExtensionRequest parseFrom(
|
||||
com.google.protobuf.CodedInputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input);
|
||||
}
|
||||
public static io.grpc.reflection.v1alpha.ExtensionRequest parseFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
|
||||
public Builder newBuilderForType() { return newBuilder(); }
|
||||
public static Builder newBuilder() {
|
||||
return DEFAULT_INSTANCE.toBuilder();
|
||||
}
|
||||
public static Builder newBuilder(io.grpc.reflection.v1alpha.ExtensionRequest prototype) {
|
||||
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
|
||||
}
|
||||
public Builder toBuilder() {
|
||||
return this == DEFAULT_INSTANCE
|
||||
? new Builder() : new Builder().mergeFrom(this);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
protected Builder newBuilderForType(
|
||||
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
|
||||
Builder builder = new Builder(parent);
|
||||
return builder;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The type name and extension number sent by the client when requesting
|
||||
* file_containing_extension.
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code grpc.reflection.v1alpha.ExtensionRequest}
|
||||
*/
|
||||
public static final class Builder extends
|
||||
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
|
||||
// @@protoc_insertion_point(builder_implements:grpc.reflection.v1alpha.ExtensionRequest)
|
||||
io.grpc.reflection.v1alpha.ExtensionRequestOrBuilder {
|
||||
public static final com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptor() {
|
||||
return io.grpc.reflection.v1alpha.ServerReflectionProto.internal_static_grpc_reflection_v1alpha_ExtensionRequest_descriptor;
|
||||
}
|
||||
|
||||
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internalGetFieldAccessorTable() {
|
||||
return io.grpc.reflection.v1alpha.ServerReflectionProto.internal_static_grpc_reflection_v1alpha_ExtensionRequest_fieldAccessorTable
|
||||
.ensureFieldAccessorsInitialized(
|
||||
io.grpc.reflection.v1alpha.ExtensionRequest.class, io.grpc.reflection.v1alpha.ExtensionRequest.Builder.class);
|
||||
}
|
||||
|
||||
// Construct using io.grpc.reflection.v1alpha.ExtensionRequest.newBuilder()
|
||||
private Builder() {
|
||||
maybeForceBuilderInitialization();
|
||||
}
|
||||
|
||||
private Builder(
|
||||
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
|
||||
super(parent);
|
||||
maybeForceBuilderInitialization();
|
||||
}
|
||||
private void maybeForceBuilderInitialization() {
|
||||
if (com.google.protobuf.GeneratedMessageV3
|
||||
.alwaysUseFieldBuilders) {
|
||||
}
|
||||
}
|
||||
public Builder clear() {
|
||||
super.clear();
|
||||
containingType_ = "";
|
||||
|
||||
extensionNumber_ = 0;
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
public com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptorForType() {
|
||||
return io.grpc.reflection.v1alpha.ServerReflectionProto.internal_static_grpc_reflection_v1alpha_ExtensionRequest_descriptor;
|
||||
}
|
||||
|
||||
public io.grpc.reflection.v1alpha.ExtensionRequest getDefaultInstanceForType() {
|
||||
return io.grpc.reflection.v1alpha.ExtensionRequest.getDefaultInstance();
|
||||
}
|
||||
|
||||
public io.grpc.reflection.v1alpha.ExtensionRequest build() {
|
||||
io.grpc.reflection.v1alpha.ExtensionRequest result = buildPartial();
|
||||
if (!result.isInitialized()) {
|
||||
throw newUninitializedMessageException(result);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public io.grpc.reflection.v1alpha.ExtensionRequest buildPartial() {
|
||||
io.grpc.reflection.v1alpha.ExtensionRequest result = new io.grpc.reflection.v1alpha.ExtensionRequest(this);
|
||||
result.containingType_ = containingType_;
|
||||
result.extensionNumber_ = extensionNumber_;
|
||||
onBuilt();
|
||||
return result;
|
||||
}
|
||||
|
||||
public Builder clone() {
|
||||
return (Builder) super.clone();
|
||||
}
|
||||
public Builder setField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||
Object value) {
|
||||
return (Builder) super.setField(field, value);
|
||||
}
|
||||
public Builder clearField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field) {
|
||||
return (Builder) super.clearField(field);
|
||||
}
|
||||
public Builder clearOneof(
|
||||
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
|
||||
return (Builder) super.clearOneof(oneof);
|
||||
}
|
||||
public Builder setRepeatedField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||
int index, Object value) {
|
||||
return (Builder) super.setRepeatedField(field, index, value);
|
||||
}
|
||||
public Builder addRepeatedField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||
Object value) {
|
||||
return (Builder) super.addRepeatedField(field, value);
|
||||
}
|
||||
public Builder mergeFrom(com.google.protobuf.Message other) {
|
||||
if (other instanceof io.grpc.reflection.v1alpha.ExtensionRequest) {
|
||||
return mergeFrom((io.grpc.reflection.v1alpha.ExtensionRequest)other);
|
||||
} else {
|
||||
super.mergeFrom(other);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
public Builder mergeFrom(io.grpc.reflection.v1alpha.ExtensionRequest other) {
|
||||
if (other == io.grpc.reflection.v1alpha.ExtensionRequest.getDefaultInstance()) return this;
|
||||
if (!other.getContainingType().isEmpty()) {
|
||||
containingType_ = other.containingType_;
|
||||
onChanged();
|
||||
}
|
||||
if (other.getExtensionNumber() != 0) {
|
||||
setExtensionNumber(other.getExtensionNumber());
|
||||
}
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
|
||||
public final boolean isInitialized() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public Builder mergeFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
io.grpc.reflection.v1alpha.ExtensionRequest parsedMessage = null;
|
||||
try {
|
||||
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
|
||||
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||
parsedMessage = (io.grpc.reflection.v1alpha.ExtensionRequest) e.getUnfinishedMessage();
|
||||
throw e.unwrapIOException();
|
||||
} finally {
|
||||
if (parsedMessage != null) {
|
||||
mergeFrom(parsedMessage);
|
||||
}
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
private java.lang.Object containingType_ = "";
|
||||
/**
|
||||
* <pre>
|
||||
* Fully-qualified type name. The format should be <package>.<type>
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string containing_type = 1;</code>
|
||||
*/
|
||||
public java.lang.String getContainingType() {
|
||||
java.lang.Object ref = containingType_;
|
||||
if (!(ref instanceof java.lang.String)) {
|
||||
com.google.protobuf.ByteString bs =
|
||||
(com.google.protobuf.ByteString) ref;
|
||||
java.lang.String s = bs.toStringUtf8();
|
||||
containingType_ = s;
|
||||
return s;
|
||||
} else {
|
||||
return (java.lang.String) ref;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Fully-qualified type name. The format should be <package>.<type>
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string containing_type = 1;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getContainingTypeBytes() {
|
||||
java.lang.Object ref = containingType_;
|
||||
if (ref instanceof String) {
|
||||
com.google.protobuf.ByteString b =
|
||||
com.google.protobuf.ByteString.copyFromUtf8(
|
||||
(java.lang.String) ref);
|
||||
containingType_ = b;
|
||||
return b;
|
||||
} else {
|
||||
return (com.google.protobuf.ByteString) ref;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Fully-qualified type name. The format should be <package>.<type>
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string containing_type = 1;</code>
|
||||
*/
|
||||
public Builder setContainingType(
|
||||
java.lang.String value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
|
||||
containingType_ = value;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Fully-qualified type name. The format should be <package>.<type>
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string containing_type = 1;</code>
|
||||
*/
|
||||
public Builder clearContainingType() {
|
||||
|
||||
containingType_ = getDefaultInstance().getContainingType();
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Fully-qualified type name. The format should be <package>.<type>
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string containing_type = 1;</code>
|
||||
*/
|
||||
public Builder setContainingTypeBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
checkByteStringIsUtf8(value);
|
||||
|
||||
containingType_ = value;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
|
||||
private int extensionNumber_ ;
|
||||
/**
|
||||
* <code>optional int32 extension_number = 2;</code>
|
||||
*/
|
||||
public int getExtensionNumber() {
|
||||
return extensionNumber_;
|
||||
}
|
||||
/**
|
||||
* <code>optional int32 extension_number = 2;</code>
|
||||
*/
|
||||
public Builder setExtensionNumber(int value) {
|
||||
|
||||
extensionNumber_ = value;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>optional int32 extension_number = 2;</code>
|
||||
*/
|
||||
public Builder clearExtensionNumber() {
|
||||
|
||||
extensionNumber_ = 0;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
public final Builder setUnknownFields(
|
||||
final com.google.protobuf.UnknownFieldSet unknownFields) {
|
||||
return this;
|
||||
}
|
||||
|
||||
public final Builder mergeUnknownFields(
|
||||
final com.google.protobuf.UnknownFieldSet unknownFields) {
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
// @@protoc_insertion_point(builder_scope:grpc.reflection.v1alpha.ExtensionRequest)
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:grpc.reflection.v1alpha.ExtensionRequest)
|
||||
private static final io.grpc.reflection.v1alpha.ExtensionRequest DEFAULT_INSTANCE;
|
||||
static {
|
||||
DEFAULT_INSTANCE = new io.grpc.reflection.v1alpha.ExtensionRequest();
|
||||
}
|
||||
|
||||
public static io.grpc.reflection.v1alpha.ExtensionRequest getDefaultInstance() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
private static final com.google.protobuf.Parser<ExtensionRequest>
|
||||
PARSER = new com.google.protobuf.AbstractParser<ExtensionRequest>() {
|
||||
public ExtensionRequest parsePartialFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return new ExtensionRequest(input, extensionRegistry);
|
||||
}
|
||||
};
|
||||
|
||||
public static com.google.protobuf.Parser<ExtensionRequest> parser() {
|
||||
return PARSER;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public com.google.protobuf.Parser<ExtensionRequest> getParserForType() {
|
||||
return PARSER;
|
||||
}
|
||||
|
||||
public io.grpc.reflection.v1alpha.ExtensionRequest getDefaultInstanceForType() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: io/grpc/reflection/v1alpha/reflection.proto
|
||||
|
||||
package io.grpc.reflection.v1alpha;
|
||||
|
||||
public interface ExtensionRequestOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:grpc.reflection.v1alpha.ExtensionRequest)
|
||||
com.google.protobuf.MessageOrBuilder {
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Fully-qualified type name. The format should be <package>.<type>
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string containing_type = 1;</code>
|
||||
*/
|
||||
java.lang.String getContainingType();
|
||||
/**
|
||||
* <pre>
|
||||
* Fully-qualified type name. The format should be <package>.<type>
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string containing_type = 1;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getContainingTypeBytes();
|
||||
|
||||
/**
|
||||
* <code>optional int32 extension_number = 2;</code>
|
||||
*/
|
||||
int getExtensionNumber();
|
||||
}
|
||||
|
|
@ -0,0 +1,582 @@
|
|||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: io/grpc/reflection/v1alpha/reflection.proto
|
||||
|
||||
package io.grpc.reflection.v1alpha;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Serialized FileDescriptorProto messages sent by the server answering
|
||||
* a file_by_filename, file_containing_symbol, or file_containing_extension
|
||||
* request.
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code grpc.reflection.v1alpha.FileDescriptorResponse}
|
||||
*/
|
||||
public final class FileDescriptorResponse extends
|
||||
com.google.protobuf.GeneratedMessageV3 implements
|
||||
// @@protoc_insertion_point(message_implements:grpc.reflection.v1alpha.FileDescriptorResponse)
|
||||
FileDescriptorResponseOrBuilder {
|
||||
// Use FileDescriptorResponse.newBuilder() to construct.
|
||||
private FileDescriptorResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
|
||||
super(builder);
|
||||
}
|
||||
private FileDescriptorResponse() {
|
||||
fileDescriptorProto_ = java.util.Collections.emptyList();
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public final com.google.protobuf.UnknownFieldSet
|
||||
getUnknownFields() {
|
||||
return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
|
||||
}
|
||||
private FileDescriptorResponse(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
this();
|
||||
int mutable_bitField0_ = 0;
|
||||
try {
|
||||
boolean done = false;
|
||||
while (!done) {
|
||||
int tag = input.readTag();
|
||||
switch (tag) {
|
||||
case 0:
|
||||
done = true;
|
||||
break;
|
||||
default: {
|
||||
if (!input.skipField(tag)) {
|
||||
done = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 10: {
|
||||
if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
|
||||
fileDescriptorProto_ = new java.util.ArrayList<com.google.protobuf.ByteString>();
|
||||
mutable_bitField0_ |= 0x00000001;
|
||||
}
|
||||
fileDescriptorProto_.add(input.readBytes());
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||
throw e.setUnfinishedMessage(this);
|
||||
} catch (java.io.IOException e) {
|
||||
throw new com.google.protobuf.InvalidProtocolBufferException(
|
||||
e).setUnfinishedMessage(this);
|
||||
} finally {
|
||||
if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
|
||||
fileDescriptorProto_ = java.util.Collections.unmodifiableList(fileDescriptorProto_);
|
||||
}
|
||||
makeExtensionsImmutable();
|
||||
}
|
||||
}
|
||||
public static final com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptor() {
|
||||
return io.grpc.reflection.v1alpha.ServerReflectionProto.internal_static_grpc_reflection_v1alpha_FileDescriptorResponse_descriptor;
|
||||
}
|
||||
|
||||
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internalGetFieldAccessorTable() {
|
||||
return io.grpc.reflection.v1alpha.ServerReflectionProto.internal_static_grpc_reflection_v1alpha_FileDescriptorResponse_fieldAccessorTable
|
||||
.ensureFieldAccessorsInitialized(
|
||||
io.grpc.reflection.v1alpha.FileDescriptorResponse.class, io.grpc.reflection.v1alpha.FileDescriptorResponse.Builder.class);
|
||||
}
|
||||
|
||||
public static final int FILE_DESCRIPTOR_PROTO_FIELD_NUMBER = 1;
|
||||
private java.util.List<com.google.protobuf.ByteString> fileDescriptorProto_;
|
||||
/**
|
||||
* <pre>
|
||||
* Serialized FileDescriptorProto messages. We avoid taking a dependency on
|
||||
* descriptor.proto, which uses proto2 only features, by making them opaque
|
||||
* bytes instead.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated bytes file_descriptor_proto = 1;</code>
|
||||
*/
|
||||
public java.util.List<com.google.protobuf.ByteString>
|
||||
getFileDescriptorProtoList() {
|
||||
return fileDescriptorProto_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Serialized FileDescriptorProto messages. We avoid taking a dependency on
|
||||
* descriptor.proto, which uses proto2 only features, by making them opaque
|
||||
* bytes instead.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated bytes file_descriptor_proto = 1;</code>
|
||||
*/
|
||||
public int getFileDescriptorProtoCount() {
|
||||
return fileDescriptorProto_.size();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Serialized FileDescriptorProto messages. We avoid taking a dependency on
|
||||
* descriptor.proto, which uses proto2 only features, by making them opaque
|
||||
* bytes instead.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated bytes file_descriptor_proto = 1;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString getFileDescriptorProto(int index) {
|
||||
return fileDescriptorProto_.get(index);
|
||||
}
|
||||
|
||||
private byte memoizedIsInitialized = -1;
|
||||
public final boolean isInitialized() {
|
||||
byte isInitialized = memoizedIsInitialized;
|
||||
if (isInitialized == 1) return true;
|
||||
if (isInitialized == 0) return false;
|
||||
|
||||
memoizedIsInitialized = 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
public void writeTo(com.google.protobuf.CodedOutputStream output)
|
||||
throws java.io.IOException {
|
||||
for (int i = 0; i < fileDescriptorProto_.size(); i++) {
|
||||
output.writeBytes(1, fileDescriptorProto_.get(i));
|
||||
}
|
||||
}
|
||||
|
||||
public int getSerializedSize() {
|
||||
int size = memoizedSize;
|
||||
if (size != -1) return size;
|
||||
|
||||
size = 0;
|
||||
{
|
||||
int dataSize = 0;
|
||||
for (int i = 0; i < fileDescriptorProto_.size(); i++) {
|
||||
dataSize += com.google.protobuf.CodedOutputStream
|
||||
.computeBytesSizeNoTag(fileDescriptorProto_.get(i));
|
||||
}
|
||||
size += dataSize;
|
||||
size += 1 * getFileDescriptorProtoList().size();
|
||||
}
|
||||
memoizedSize = size;
|
||||
return size;
|
||||
}
|
||||
|
||||
private static final long serialVersionUID = 0L;
|
||||
@java.lang.Override
|
||||
public boolean equals(final java.lang.Object obj) {
|
||||
if (obj == this) {
|
||||
return true;
|
||||
}
|
||||
if (!(obj instanceof io.grpc.reflection.v1alpha.FileDescriptorResponse)) {
|
||||
return super.equals(obj);
|
||||
}
|
||||
io.grpc.reflection.v1alpha.FileDescriptorResponse other = (io.grpc.reflection.v1alpha.FileDescriptorResponse) obj;
|
||||
|
||||
boolean result = true;
|
||||
result = result && getFileDescriptorProtoList()
|
||||
.equals(other.getFileDescriptorProtoList());
|
||||
return result;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public int hashCode() {
|
||||
if (memoizedHashCode != 0) {
|
||||
return memoizedHashCode;
|
||||
}
|
||||
int hash = 41;
|
||||
hash = (19 * hash) + getDescriptorForType().hashCode();
|
||||
if (getFileDescriptorProtoCount() > 0) {
|
||||
hash = (37 * hash) + FILE_DESCRIPTOR_PROTO_FIELD_NUMBER;
|
||||
hash = (53 * hash) + getFileDescriptorProtoList().hashCode();
|
||||
}
|
||||
hash = (29 * hash) + unknownFields.hashCode();
|
||||
memoizedHashCode = hash;
|
||||
return hash;
|
||||
}
|
||||
|
||||
public static io.grpc.reflection.v1alpha.FileDescriptorResponse parseFrom(
|
||||
com.google.protobuf.ByteString data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static io.grpc.reflection.v1alpha.FileDescriptorResponse parseFrom(
|
||||
com.google.protobuf.ByteString data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
public static io.grpc.reflection.v1alpha.FileDescriptorResponse parseFrom(byte[] data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static io.grpc.reflection.v1alpha.FileDescriptorResponse parseFrom(
|
||||
byte[] data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
public static io.grpc.reflection.v1alpha.FileDescriptorResponse parseFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input);
|
||||
}
|
||||
public static io.grpc.reflection.v1alpha.FileDescriptorResponse parseFrom(
|
||||
java.io.InputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
public static io.grpc.reflection.v1alpha.FileDescriptorResponse parseDelimitedFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseDelimitedWithIOException(PARSER, input);
|
||||
}
|
||||
public static io.grpc.reflection.v1alpha.FileDescriptorResponse parseDelimitedFrom(
|
||||
java.io.InputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
public static io.grpc.reflection.v1alpha.FileDescriptorResponse parseFrom(
|
||||
com.google.protobuf.CodedInputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input);
|
||||
}
|
||||
public static io.grpc.reflection.v1alpha.FileDescriptorResponse parseFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
|
||||
public Builder newBuilderForType() { return newBuilder(); }
|
||||
public static Builder newBuilder() {
|
||||
return DEFAULT_INSTANCE.toBuilder();
|
||||
}
|
||||
public static Builder newBuilder(io.grpc.reflection.v1alpha.FileDescriptorResponse prototype) {
|
||||
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
|
||||
}
|
||||
public Builder toBuilder() {
|
||||
return this == DEFAULT_INSTANCE
|
||||
? new Builder() : new Builder().mergeFrom(this);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
protected Builder newBuilderForType(
|
||||
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
|
||||
Builder builder = new Builder(parent);
|
||||
return builder;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Serialized FileDescriptorProto messages sent by the server answering
|
||||
* a file_by_filename, file_containing_symbol, or file_containing_extension
|
||||
* request.
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code grpc.reflection.v1alpha.FileDescriptorResponse}
|
||||
*/
|
||||
public static final class Builder extends
|
||||
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
|
||||
// @@protoc_insertion_point(builder_implements:grpc.reflection.v1alpha.FileDescriptorResponse)
|
||||
io.grpc.reflection.v1alpha.FileDescriptorResponseOrBuilder {
|
||||
public static final com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptor() {
|
||||
return io.grpc.reflection.v1alpha.ServerReflectionProto.internal_static_grpc_reflection_v1alpha_FileDescriptorResponse_descriptor;
|
||||
}
|
||||
|
||||
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internalGetFieldAccessorTable() {
|
||||
return io.grpc.reflection.v1alpha.ServerReflectionProto.internal_static_grpc_reflection_v1alpha_FileDescriptorResponse_fieldAccessorTable
|
||||
.ensureFieldAccessorsInitialized(
|
||||
io.grpc.reflection.v1alpha.FileDescriptorResponse.class, io.grpc.reflection.v1alpha.FileDescriptorResponse.Builder.class);
|
||||
}
|
||||
|
||||
// Construct using io.grpc.reflection.v1alpha.FileDescriptorResponse.newBuilder()
|
||||
private Builder() {
|
||||
maybeForceBuilderInitialization();
|
||||
}
|
||||
|
||||
private Builder(
|
||||
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
|
||||
super(parent);
|
||||
maybeForceBuilderInitialization();
|
||||
}
|
||||
private void maybeForceBuilderInitialization() {
|
||||
if (com.google.protobuf.GeneratedMessageV3
|
||||
.alwaysUseFieldBuilders) {
|
||||
}
|
||||
}
|
||||
public Builder clear() {
|
||||
super.clear();
|
||||
fileDescriptorProto_ = java.util.Collections.emptyList();
|
||||
bitField0_ = (bitField0_ & ~0x00000001);
|
||||
return this;
|
||||
}
|
||||
|
||||
public com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptorForType() {
|
||||
return io.grpc.reflection.v1alpha.ServerReflectionProto.internal_static_grpc_reflection_v1alpha_FileDescriptorResponse_descriptor;
|
||||
}
|
||||
|
||||
public io.grpc.reflection.v1alpha.FileDescriptorResponse getDefaultInstanceForType() {
|
||||
return io.grpc.reflection.v1alpha.FileDescriptorResponse.getDefaultInstance();
|
||||
}
|
||||
|
||||
public io.grpc.reflection.v1alpha.FileDescriptorResponse build() {
|
||||
io.grpc.reflection.v1alpha.FileDescriptorResponse result = buildPartial();
|
||||
if (!result.isInitialized()) {
|
||||
throw newUninitializedMessageException(result);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public io.grpc.reflection.v1alpha.FileDescriptorResponse buildPartial() {
|
||||
io.grpc.reflection.v1alpha.FileDescriptorResponse result = new io.grpc.reflection.v1alpha.FileDescriptorResponse(this);
|
||||
int from_bitField0_ = bitField0_;
|
||||
if (((bitField0_ & 0x00000001) == 0x00000001)) {
|
||||
fileDescriptorProto_ = java.util.Collections.unmodifiableList(fileDescriptorProto_);
|
||||
bitField0_ = (bitField0_ & ~0x00000001);
|
||||
}
|
||||
result.fileDescriptorProto_ = fileDescriptorProto_;
|
||||
onBuilt();
|
||||
return result;
|
||||
}
|
||||
|
||||
public Builder clone() {
|
||||
return (Builder) super.clone();
|
||||
}
|
||||
public Builder setField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||
Object value) {
|
||||
return (Builder) super.setField(field, value);
|
||||
}
|
||||
public Builder clearField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field) {
|
||||
return (Builder) super.clearField(field);
|
||||
}
|
||||
public Builder clearOneof(
|
||||
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
|
||||
return (Builder) super.clearOneof(oneof);
|
||||
}
|
||||
public Builder setRepeatedField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||
int index, Object value) {
|
||||
return (Builder) super.setRepeatedField(field, index, value);
|
||||
}
|
||||
public Builder addRepeatedField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||
Object value) {
|
||||
return (Builder) super.addRepeatedField(field, value);
|
||||
}
|
||||
public Builder mergeFrom(com.google.protobuf.Message other) {
|
||||
if (other instanceof io.grpc.reflection.v1alpha.FileDescriptorResponse) {
|
||||
return mergeFrom((io.grpc.reflection.v1alpha.FileDescriptorResponse)other);
|
||||
} else {
|
||||
super.mergeFrom(other);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
public Builder mergeFrom(io.grpc.reflection.v1alpha.FileDescriptorResponse other) {
|
||||
if (other == io.grpc.reflection.v1alpha.FileDescriptorResponse.getDefaultInstance()) return this;
|
||||
if (!other.fileDescriptorProto_.isEmpty()) {
|
||||
if (fileDescriptorProto_.isEmpty()) {
|
||||
fileDescriptorProto_ = other.fileDescriptorProto_;
|
||||
bitField0_ = (bitField0_ & ~0x00000001);
|
||||
} else {
|
||||
ensureFileDescriptorProtoIsMutable();
|
||||
fileDescriptorProto_.addAll(other.fileDescriptorProto_);
|
||||
}
|
||||
onChanged();
|
||||
}
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
|
||||
public final boolean isInitialized() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public Builder mergeFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
io.grpc.reflection.v1alpha.FileDescriptorResponse parsedMessage = null;
|
||||
try {
|
||||
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
|
||||
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||
parsedMessage = (io.grpc.reflection.v1alpha.FileDescriptorResponse) e.getUnfinishedMessage();
|
||||
throw e.unwrapIOException();
|
||||
} finally {
|
||||
if (parsedMessage != null) {
|
||||
mergeFrom(parsedMessage);
|
||||
}
|
||||
}
|
||||
return this;
|
||||
}
|
||||
private int bitField0_;
|
||||
|
||||
private java.util.List<com.google.protobuf.ByteString> fileDescriptorProto_ = java.util.Collections.emptyList();
|
||||
private void ensureFileDescriptorProtoIsMutable() {
|
||||
if (!((bitField0_ & 0x00000001) == 0x00000001)) {
|
||||
fileDescriptorProto_ = new java.util.ArrayList<com.google.protobuf.ByteString>(fileDescriptorProto_);
|
||||
bitField0_ |= 0x00000001;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Serialized FileDescriptorProto messages. We avoid taking a dependency on
|
||||
* descriptor.proto, which uses proto2 only features, by making them opaque
|
||||
* bytes instead.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated bytes file_descriptor_proto = 1;</code>
|
||||
*/
|
||||
public java.util.List<com.google.protobuf.ByteString>
|
||||
getFileDescriptorProtoList() {
|
||||
return java.util.Collections.unmodifiableList(fileDescriptorProto_);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Serialized FileDescriptorProto messages. We avoid taking a dependency on
|
||||
* descriptor.proto, which uses proto2 only features, by making them opaque
|
||||
* bytes instead.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated bytes file_descriptor_proto = 1;</code>
|
||||
*/
|
||||
public int getFileDescriptorProtoCount() {
|
||||
return fileDescriptorProto_.size();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Serialized FileDescriptorProto messages. We avoid taking a dependency on
|
||||
* descriptor.proto, which uses proto2 only features, by making them opaque
|
||||
* bytes instead.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated bytes file_descriptor_proto = 1;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString getFileDescriptorProto(int index) {
|
||||
return fileDescriptorProto_.get(index);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Serialized FileDescriptorProto messages. We avoid taking a dependency on
|
||||
* descriptor.proto, which uses proto2 only features, by making them opaque
|
||||
* bytes instead.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated bytes file_descriptor_proto = 1;</code>
|
||||
*/
|
||||
public Builder setFileDescriptorProto(
|
||||
int index, com.google.protobuf.ByteString value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
ensureFileDescriptorProtoIsMutable();
|
||||
fileDescriptorProto_.set(index, value);
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Serialized FileDescriptorProto messages. We avoid taking a dependency on
|
||||
* descriptor.proto, which uses proto2 only features, by making them opaque
|
||||
* bytes instead.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated bytes file_descriptor_proto = 1;</code>
|
||||
*/
|
||||
public Builder addFileDescriptorProto(com.google.protobuf.ByteString value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
ensureFileDescriptorProtoIsMutable();
|
||||
fileDescriptorProto_.add(value);
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Serialized FileDescriptorProto messages. We avoid taking a dependency on
|
||||
* descriptor.proto, which uses proto2 only features, by making them opaque
|
||||
* bytes instead.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated bytes file_descriptor_proto = 1;</code>
|
||||
*/
|
||||
public Builder addAllFileDescriptorProto(
|
||||
java.lang.Iterable<? extends com.google.protobuf.ByteString> values) {
|
||||
ensureFileDescriptorProtoIsMutable();
|
||||
com.google.protobuf.AbstractMessageLite.Builder.addAll(
|
||||
values, fileDescriptorProto_);
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Serialized FileDescriptorProto messages. We avoid taking a dependency on
|
||||
* descriptor.proto, which uses proto2 only features, by making them opaque
|
||||
* bytes instead.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated bytes file_descriptor_proto = 1;</code>
|
||||
*/
|
||||
public Builder clearFileDescriptorProto() {
|
||||
fileDescriptorProto_ = java.util.Collections.emptyList();
|
||||
bitField0_ = (bitField0_ & ~0x00000001);
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
public final Builder setUnknownFields(
|
||||
final com.google.protobuf.UnknownFieldSet unknownFields) {
|
||||
return this;
|
||||
}
|
||||
|
||||
public final Builder mergeUnknownFields(
|
||||
final com.google.protobuf.UnknownFieldSet unknownFields) {
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
// @@protoc_insertion_point(builder_scope:grpc.reflection.v1alpha.FileDescriptorResponse)
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:grpc.reflection.v1alpha.FileDescriptorResponse)
|
||||
private static final io.grpc.reflection.v1alpha.FileDescriptorResponse DEFAULT_INSTANCE;
|
||||
static {
|
||||
DEFAULT_INSTANCE = new io.grpc.reflection.v1alpha.FileDescriptorResponse();
|
||||
}
|
||||
|
||||
public static io.grpc.reflection.v1alpha.FileDescriptorResponse getDefaultInstance() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
private static final com.google.protobuf.Parser<FileDescriptorResponse>
|
||||
PARSER = new com.google.protobuf.AbstractParser<FileDescriptorResponse>() {
|
||||
public FileDescriptorResponse parsePartialFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return new FileDescriptorResponse(input, extensionRegistry);
|
||||
}
|
||||
};
|
||||
|
||||
public static com.google.protobuf.Parser<FileDescriptorResponse> parser() {
|
||||
return PARSER;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public com.google.protobuf.Parser<FileDescriptorResponse> getParserForType() {
|
||||
return PARSER;
|
||||
}
|
||||
|
||||
public io.grpc.reflection.v1alpha.FileDescriptorResponse getDefaultInstanceForType() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: io/grpc/reflection/v1alpha/reflection.proto
|
||||
|
||||
package io.grpc.reflection.v1alpha;
|
||||
|
||||
public interface FileDescriptorResponseOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:grpc.reflection.v1alpha.FileDescriptorResponse)
|
||||
com.google.protobuf.MessageOrBuilder {
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Serialized FileDescriptorProto messages. We avoid taking a dependency on
|
||||
* descriptor.proto, which uses proto2 only features, by making them opaque
|
||||
* bytes instead.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated bytes file_descriptor_proto = 1;</code>
|
||||
*/
|
||||
java.util.List<com.google.protobuf.ByteString> getFileDescriptorProtoList();
|
||||
/**
|
||||
* <pre>
|
||||
* Serialized FileDescriptorProto messages. We avoid taking a dependency on
|
||||
* descriptor.proto, which uses proto2 only features, by making them opaque
|
||||
* bytes instead.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated bytes file_descriptor_proto = 1;</code>
|
||||
*/
|
||||
int getFileDescriptorProtoCount();
|
||||
/**
|
||||
* <pre>
|
||||
* Serialized FileDescriptorProto messages. We avoid taking a dependency on
|
||||
* descriptor.proto, which uses proto2 only features, by making them opaque
|
||||
* bytes instead.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated bytes file_descriptor_proto = 1;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString getFileDescriptorProto(int index);
|
||||
}
|
||||
|
|
@ -0,0 +1,835 @@
|
|||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: io/grpc/reflection/v1alpha/reflection.proto
|
||||
|
||||
package io.grpc.reflection.v1alpha;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* A list of ServiceResponse sent by the server answering list_services request.
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code grpc.reflection.v1alpha.ListServiceResponse}
|
||||
*/
|
||||
public final class ListServiceResponse extends
|
||||
com.google.protobuf.GeneratedMessageV3 implements
|
||||
// @@protoc_insertion_point(message_implements:grpc.reflection.v1alpha.ListServiceResponse)
|
||||
ListServiceResponseOrBuilder {
|
||||
// Use ListServiceResponse.newBuilder() to construct.
|
||||
private ListServiceResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
|
||||
super(builder);
|
||||
}
|
||||
private ListServiceResponse() {
|
||||
service_ = java.util.Collections.emptyList();
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public final com.google.protobuf.UnknownFieldSet
|
||||
getUnknownFields() {
|
||||
return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
|
||||
}
|
||||
private ListServiceResponse(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
this();
|
||||
int mutable_bitField0_ = 0;
|
||||
try {
|
||||
boolean done = false;
|
||||
while (!done) {
|
||||
int tag = input.readTag();
|
||||
switch (tag) {
|
||||
case 0:
|
||||
done = true;
|
||||
break;
|
||||
default: {
|
||||
if (!input.skipField(tag)) {
|
||||
done = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 10: {
|
||||
if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
|
||||
service_ = new java.util.ArrayList<io.grpc.reflection.v1alpha.ServiceResponse>();
|
||||
mutable_bitField0_ |= 0x00000001;
|
||||
}
|
||||
service_.add(
|
||||
input.readMessage(io.grpc.reflection.v1alpha.ServiceResponse.parser(), extensionRegistry));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||
throw e.setUnfinishedMessage(this);
|
||||
} catch (java.io.IOException e) {
|
||||
throw new com.google.protobuf.InvalidProtocolBufferException(
|
||||
e).setUnfinishedMessage(this);
|
||||
} finally {
|
||||
if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
|
||||
service_ = java.util.Collections.unmodifiableList(service_);
|
||||
}
|
||||
makeExtensionsImmutable();
|
||||
}
|
||||
}
|
||||
public static final com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptor() {
|
||||
return io.grpc.reflection.v1alpha.ServerReflectionProto.internal_static_grpc_reflection_v1alpha_ListServiceResponse_descriptor;
|
||||
}
|
||||
|
||||
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internalGetFieldAccessorTable() {
|
||||
return io.grpc.reflection.v1alpha.ServerReflectionProto.internal_static_grpc_reflection_v1alpha_ListServiceResponse_fieldAccessorTable
|
||||
.ensureFieldAccessorsInitialized(
|
||||
io.grpc.reflection.v1alpha.ListServiceResponse.class, io.grpc.reflection.v1alpha.ListServiceResponse.Builder.class);
|
||||
}
|
||||
|
||||
public static final int SERVICE_FIELD_NUMBER = 1;
|
||||
private java.util.List<io.grpc.reflection.v1alpha.ServiceResponse> service_;
|
||||
/**
|
||||
* <pre>
|
||||
* The information of each service may be expanded in the future, so we use
|
||||
* ServiceResponse message to encapsulate it.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .grpc.reflection.v1alpha.ServiceResponse service = 1;</code>
|
||||
*/
|
||||
public java.util.List<io.grpc.reflection.v1alpha.ServiceResponse> getServiceList() {
|
||||
return service_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The information of each service may be expanded in the future, so we use
|
||||
* ServiceResponse message to encapsulate it.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .grpc.reflection.v1alpha.ServiceResponse service = 1;</code>
|
||||
*/
|
||||
public java.util.List<? extends io.grpc.reflection.v1alpha.ServiceResponseOrBuilder>
|
||||
getServiceOrBuilderList() {
|
||||
return service_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The information of each service may be expanded in the future, so we use
|
||||
* ServiceResponse message to encapsulate it.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .grpc.reflection.v1alpha.ServiceResponse service = 1;</code>
|
||||
*/
|
||||
public int getServiceCount() {
|
||||
return service_.size();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The information of each service may be expanded in the future, so we use
|
||||
* ServiceResponse message to encapsulate it.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .grpc.reflection.v1alpha.ServiceResponse service = 1;</code>
|
||||
*/
|
||||
public io.grpc.reflection.v1alpha.ServiceResponse getService(int index) {
|
||||
return service_.get(index);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The information of each service may be expanded in the future, so we use
|
||||
* ServiceResponse message to encapsulate it.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .grpc.reflection.v1alpha.ServiceResponse service = 1;</code>
|
||||
*/
|
||||
public io.grpc.reflection.v1alpha.ServiceResponseOrBuilder getServiceOrBuilder(
|
||||
int index) {
|
||||
return service_.get(index);
|
||||
}
|
||||
|
||||
private byte memoizedIsInitialized = -1;
|
||||
public final boolean isInitialized() {
|
||||
byte isInitialized = memoizedIsInitialized;
|
||||
if (isInitialized == 1) return true;
|
||||
if (isInitialized == 0) return false;
|
||||
|
||||
memoizedIsInitialized = 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
public void writeTo(com.google.protobuf.CodedOutputStream output)
|
||||
throws java.io.IOException {
|
||||
for (int i = 0; i < service_.size(); i++) {
|
||||
output.writeMessage(1, service_.get(i));
|
||||
}
|
||||
}
|
||||
|
||||
public int getSerializedSize() {
|
||||
int size = memoizedSize;
|
||||
if (size != -1) return size;
|
||||
|
||||
size = 0;
|
||||
for (int i = 0; i < service_.size(); i++) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeMessageSize(1, service_.get(i));
|
||||
}
|
||||
memoizedSize = size;
|
||||
return size;
|
||||
}
|
||||
|
||||
private static final long serialVersionUID = 0L;
|
||||
@java.lang.Override
|
||||
public boolean equals(final java.lang.Object obj) {
|
||||
if (obj == this) {
|
||||
return true;
|
||||
}
|
||||
if (!(obj instanceof io.grpc.reflection.v1alpha.ListServiceResponse)) {
|
||||
return super.equals(obj);
|
||||
}
|
||||
io.grpc.reflection.v1alpha.ListServiceResponse other = (io.grpc.reflection.v1alpha.ListServiceResponse) obj;
|
||||
|
||||
boolean result = true;
|
||||
result = result && getServiceList()
|
||||
.equals(other.getServiceList());
|
||||
return result;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public int hashCode() {
|
||||
if (memoizedHashCode != 0) {
|
||||
return memoizedHashCode;
|
||||
}
|
||||
int hash = 41;
|
||||
hash = (19 * hash) + getDescriptorForType().hashCode();
|
||||
if (getServiceCount() > 0) {
|
||||
hash = (37 * hash) + SERVICE_FIELD_NUMBER;
|
||||
hash = (53 * hash) + getServiceList().hashCode();
|
||||
}
|
||||
hash = (29 * hash) + unknownFields.hashCode();
|
||||
memoizedHashCode = hash;
|
||||
return hash;
|
||||
}
|
||||
|
||||
public static io.grpc.reflection.v1alpha.ListServiceResponse parseFrom(
|
||||
com.google.protobuf.ByteString data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static io.grpc.reflection.v1alpha.ListServiceResponse parseFrom(
|
||||
com.google.protobuf.ByteString data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
public static io.grpc.reflection.v1alpha.ListServiceResponse parseFrom(byte[] data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static io.grpc.reflection.v1alpha.ListServiceResponse parseFrom(
|
||||
byte[] data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
public static io.grpc.reflection.v1alpha.ListServiceResponse parseFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input);
|
||||
}
|
||||
public static io.grpc.reflection.v1alpha.ListServiceResponse parseFrom(
|
||||
java.io.InputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
public static io.grpc.reflection.v1alpha.ListServiceResponse parseDelimitedFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseDelimitedWithIOException(PARSER, input);
|
||||
}
|
||||
public static io.grpc.reflection.v1alpha.ListServiceResponse parseDelimitedFrom(
|
||||
java.io.InputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
public static io.grpc.reflection.v1alpha.ListServiceResponse parseFrom(
|
||||
com.google.protobuf.CodedInputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input);
|
||||
}
|
||||
public static io.grpc.reflection.v1alpha.ListServiceResponse parseFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
|
||||
public Builder newBuilderForType() { return newBuilder(); }
|
||||
public static Builder newBuilder() {
|
||||
return DEFAULT_INSTANCE.toBuilder();
|
||||
}
|
||||
public static Builder newBuilder(io.grpc.reflection.v1alpha.ListServiceResponse prototype) {
|
||||
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
|
||||
}
|
||||
public Builder toBuilder() {
|
||||
return this == DEFAULT_INSTANCE
|
||||
? new Builder() : new Builder().mergeFrom(this);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
protected Builder newBuilderForType(
|
||||
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
|
||||
Builder builder = new Builder(parent);
|
||||
return builder;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A list of ServiceResponse sent by the server answering list_services request.
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code grpc.reflection.v1alpha.ListServiceResponse}
|
||||
*/
|
||||
public static final class Builder extends
|
||||
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
|
||||
// @@protoc_insertion_point(builder_implements:grpc.reflection.v1alpha.ListServiceResponse)
|
||||
io.grpc.reflection.v1alpha.ListServiceResponseOrBuilder {
|
||||
public static final com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptor() {
|
||||
return io.grpc.reflection.v1alpha.ServerReflectionProto.internal_static_grpc_reflection_v1alpha_ListServiceResponse_descriptor;
|
||||
}
|
||||
|
||||
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internalGetFieldAccessorTable() {
|
||||
return io.grpc.reflection.v1alpha.ServerReflectionProto.internal_static_grpc_reflection_v1alpha_ListServiceResponse_fieldAccessorTable
|
||||
.ensureFieldAccessorsInitialized(
|
||||
io.grpc.reflection.v1alpha.ListServiceResponse.class, io.grpc.reflection.v1alpha.ListServiceResponse.Builder.class);
|
||||
}
|
||||
|
||||
// Construct using io.grpc.reflection.v1alpha.ListServiceResponse.newBuilder()
|
||||
private Builder() {
|
||||
maybeForceBuilderInitialization();
|
||||
}
|
||||
|
||||
private Builder(
|
||||
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
|
||||
super(parent);
|
||||
maybeForceBuilderInitialization();
|
||||
}
|
||||
private void maybeForceBuilderInitialization() {
|
||||
if (com.google.protobuf.GeneratedMessageV3
|
||||
.alwaysUseFieldBuilders) {
|
||||
getServiceFieldBuilder();
|
||||
}
|
||||
}
|
||||
public Builder clear() {
|
||||
super.clear();
|
||||
if (serviceBuilder_ == null) {
|
||||
service_ = java.util.Collections.emptyList();
|
||||
bitField0_ = (bitField0_ & ~0x00000001);
|
||||
} else {
|
||||
serviceBuilder_.clear();
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
public com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptorForType() {
|
||||
return io.grpc.reflection.v1alpha.ServerReflectionProto.internal_static_grpc_reflection_v1alpha_ListServiceResponse_descriptor;
|
||||
}
|
||||
|
||||
public io.grpc.reflection.v1alpha.ListServiceResponse getDefaultInstanceForType() {
|
||||
return io.grpc.reflection.v1alpha.ListServiceResponse.getDefaultInstance();
|
||||
}
|
||||
|
||||
public io.grpc.reflection.v1alpha.ListServiceResponse build() {
|
||||
io.grpc.reflection.v1alpha.ListServiceResponse result = buildPartial();
|
||||
if (!result.isInitialized()) {
|
||||
throw newUninitializedMessageException(result);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public io.grpc.reflection.v1alpha.ListServiceResponse buildPartial() {
|
||||
io.grpc.reflection.v1alpha.ListServiceResponse result = new io.grpc.reflection.v1alpha.ListServiceResponse(this);
|
||||
int from_bitField0_ = bitField0_;
|
||||
if (serviceBuilder_ == null) {
|
||||
if (((bitField0_ & 0x00000001) == 0x00000001)) {
|
||||
service_ = java.util.Collections.unmodifiableList(service_);
|
||||
bitField0_ = (bitField0_ & ~0x00000001);
|
||||
}
|
||||
result.service_ = service_;
|
||||
} else {
|
||||
result.service_ = serviceBuilder_.build();
|
||||
}
|
||||
onBuilt();
|
||||
return result;
|
||||
}
|
||||
|
||||
public Builder clone() {
|
||||
return (Builder) super.clone();
|
||||
}
|
||||
public Builder setField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||
Object value) {
|
||||
return (Builder) super.setField(field, value);
|
||||
}
|
||||
public Builder clearField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field) {
|
||||
return (Builder) super.clearField(field);
|
||||
}
|
||||
public Builder clearOneof(
|
||||
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
|
||||
return (Builder) super.clearOneof(oneof);
|
||||
}
|
||||
public Builder setRepeatedField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||
int index, Object value) {
|
||||
return (Builder) super.setRepeatedField(field, index, value);
|
||||
}
|
||||
public Builder addRepeatedField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||
Object value) {
|
||||
return (Builder) super.addRepeatedField(field, value);
|
||||
}
|
||||
public Builder mergeFrom(com.google.protobuf.Message other) {
|
||||
if (other instanceof io.grpc.reflection.v1alpha.ListServiceResponse) {
|
||||
return mergeFrom((io.grpc.reflection.v1alpha.ListServiceResponse)other);
|
||||
} else {
|
||||
super.mergeFrom(other);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
public Builder mergeFrom(io.grpc.reflection.v1alpha.ListServiceResponse other) {
|
||||
if (other == io.grpc.reflection.v1alpha.ListServiceResponse.getDefaultInstance()) return this;
|
||||
if (serviceBuilder_ == null) {
|
||||
if (!other.service_.isEmpty()) {
|
||||
if (service_.isEmpty()) {
|
||||
service_ = other.service_;
|
||||
bitField0_ = (bitField0_ & ~0x00000001);
|
||||
} else {
|
||||
ensureServiceIsMutable();
|
||||
service_.addAll(other.service_);
|
||||
}
|
||||
onChanged();
|
||||
}
|
||||
} else {
|
||||
if (!other.service_.isEmpty()) {
|
||||
if (serviceBuilder_.isEmpty()) {
|
||||
serviceBuilder_.dispose();
|
||||
serviceBuilder_ = null;
|
||||
service_ = other.service_;
|
||||
bitField0_ = (bitField0_ & ~0x00000001);
|
||||
serviceBuilder_ =
|
||||
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
|
||||
getServiceFieldBuilder() : null;
|
||||
} else {
|
||||
serviceBuilder_.addAllMessages(other.service_);
|
||||
}
|
||||
}
|
||||
}
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
|
||||
public final boolean isInitialized() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public Builder mergeFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
io.grpc.reflection.v1alpha.ListServiceResponse parsedMessage = null;
|
||||
try {
|
||||
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
|
||||
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||
parsedMessage = (io.grpc.reflection.v1alpha.ListServiceResponse) e.getUnfinishedMessage();
|
||||
throw e.unwrapIOException();
|
||||
} finally {
|
||||
if (parsedMessage != null) {
|
||||
mergeFrom(parsedMessage);
|
||||
}
|
||||
}
|
||||
return this;
|
||||
}
|
||||
private int bitField0_;
|
||||
|
||||
private java.util.List<io.grpc.reflection.v1alpha.ServiceResponse> service_ =
|
||||
java.util.Collections.emptyList();
|
||||
private void ensureServiceIsMutable() {
|
||||
if (!((bitField0_ & 0x00000001) == 0x00000001)) {
|
||||
service_ = new java.util.ArrayList<io.grpc.reflection.v1alpha.ServiceResponse>(service_);
|
||||
bitField0_ |= 0x00000001;
|
||||
}
|
||||
}
|
||||
|
||||
private com.google.protobuf.RepeatedFieldBuilderV3<
|
||||
io.grpc.reflection.v1alpha.ServiceResponse, io.grpc.reflection.v1alpha.ServiceResponse.Builder, io.grpc.reflection.v1alpha.ServiceResponseOrBuilder> serviceBuilder_;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The information of each service may be expanded in the future, so we use
|
||||
* ServiceResponse message to encapsulate it.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .grpc.reflection.v1alpha.ServiceResponse service = 1;</code>
|
||||
*/
|
||||
public java.util.List<io.grpc.reflection.v1alpha.ServiceResponse> getServiceList() {
|
||||
if (serviceBuilder_ == null) {
|
||||
return java.util.Collections.unmodifiableList(service_);
|
||||
} else {
|
||||
return serviceBuilder_.getMessageList();
|
||||
}
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The information of each service may be expanded in the future, so we use
|
||||
* ServiceResponse message to encapsulate it.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .grpc.reflection.v1alpha.ServiceResponse service = 1;</code>
|
||||
*/
|
||||
public int getServiceCount() {
|
||||
if (serviceBuilder_ == null) {
|
||||
return service_.size();
|
||||
} else {
|
||||
return serviceBuilder_.getCount();
|
||||
}
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The information of each service may be expanded in the future, so we use
|
||||
* ServiceResponse message to encapsulate it.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .grpc.reflection.v1alpha.ServiceResponse service = 1;</code>
|
||||
*/
|
||||
public io.grpc.reflection.v1alpha.ServiceResponse getService(int index) {
|
||||
if (serviceBuilder_ == null) {
|
||||
return service_.get(index);
|
||||
} else {
|
||||
return serviceBuilder_.getMessage(index);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The information of each service may be expanded in the future, so we use
|
||||
* ServiceResponse message to encapsulate it.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .grpc.reflection.v1alpha.ServiceResponse service = 1;</code>
|
||||
*/
|
||||
public Builder setService(
|
||||
int index, io.grpc.reflection.v1alpha.ServiceResponse value) {
|
||||
if (serviceBuilder_ == null) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
ensureServiceIsMutable();
|
||||
service_.set(index, value);
|
||||
onChanged();
|
||||
} else {
|
||||
serviceBuilder_.setMessage(index, value);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The information of each service may be expanded in the future, so we use
|
||||
* ServiceResponse message to encapsulate it.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .grpc.reflection.v1alpha.ServiceResponse service = 1;</code>
|
||||
*/
|
||||
public Builder setService(
|
||||
int index, io.grpc.reflection.v1alpha.ServiceResponse.Builder builderForValue) {
|
||||
if (serviceBuilder_ == null) {
|
||||
ensureServiceIsMutable();
|
||||
service_.set(index, builderForValue.build());
|
||||
onChanged();
|
||||
} else {
|
||||
serviceBuilder_.setMessage(index, builderForValue.build());
|
||||
}
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The information of each service may be expanded in the future, so we use
|
||||
* ServiceResponse message to encapsulate it.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .grpc.reflection.v1alpha.ServiceResponse service = 1;</code>
|
||||
*/
|
||||
public Builder addService(io.grpc.reflection.v1alpha.ServiceResponse value) {
|
||||
if (serviceBuilder_ == null) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
ensureServiceIsMutable();
|
||||
service_.add(value);
|
||||
onChanged();
|
||||
} else {
|
||||
serviceBuilder_.addMessage(value);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The information of each service may be expanded in the future, so we use
|
||||
* ServiceResponse message to encapsulate it.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .grpc.reflection.v1alpha.ServiceResponse service = 1;</code>
|
||||
*/
|
||||
public Builder addService(
|
||||
int index, io.grpc.reflection.v1alpha.ServiceResponse value) {
|
||||
if (serviceBuilder_ == null) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
ensureServiceIsMutable();
|
||||
service_.add(index, value);
|
||||
onChanged();
|
||||
} else {
|
||||
serviceBuilder_.addMessage(index, value);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The information of each service may be expanded in the future, so we use
|
||||
* ServiceResponse message to encapsulate it.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .grpc.reflection.v1alpha.ServiceResponse service = 1;</code>
|
||||
*/
|
||||
public Builder addService(
|
||||
io.grpc.reflection.v1alpha.ServiceResponse.Builder builderForValue) {
|
||||
if (serviceBuilder_ == null) {
|
||||
ensureServiceIsMutable();
|
||||
service_.add(builderForValue.build());
|
||||
onChanged();
|
||||
} else {
|
||||
serviceBuilder_.addMessage(builderForValue.build());
|
||||
}
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The information of each service may be expanded in the future, so we use
|
||||
* ServiceResponse message to encapsulate it.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .grpc.reflection.v1alpha.ServiceResponse service = 1;</code>
|
||||
*/
|
||||
public Builder addService(
|
||||
int index, io.grpc.reflection.v1alpha.ServiceResponse.Builder builderForValue) {
|
||||
if (serviceBuilder_ == null) {
|
||||
ensureServiceIsMutable();
|
||||
service_.add(index, builderForValue.build());
|
||||
onChanged();
|
||||
} else {
|
||||
serviceBuilder_.addMessage(index, builderForValue.build());
|
||||
}
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The information of each service may be expanded in the future, so we use
|
||||
* ServiceResponse message to encapsulate it.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .grpc.reflection.v1alpha.ServiceResponse service = 1;</code>
|
||||
*/
|
||||
public Builder addAllService(
|
||||
java.lang.Iterable<? extends io.grpc.reflection.v1alpha.ServiceResponse> values) {
|
||||
if (serviceBuilder_ == null) {
|
||||
ensureServiceIsMutable();
|
||||
com.google.protobuf.AbstractMessageLite.Builder.addAll(
|
||||
values, service_);
|
||||
onChanged();
|
||||
} else {
|
||||
serviceBuilder_.addAllMessages(values);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The information of each service may be expanded in the future, so we use
|
||||
* ServiceResponse message to encapsulate it.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .grpc.reflection.v1alpha.ServiceResponse service = 1;</code>
|
||||
*/
|
||||
public Builder clearService() {
|
||||
if (serviceBuilder_ == null) {
|
||||
service_ = java.util.Collections.emptyList();
|
||||
bitField0_ = (bitField0_ & ~0x00000001);
|
||||
onChanged();
|
||||
} else {
|
||||
serviceBuilder_.clear();
|
||||
}
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The information of each service may be expanded in the future, so we use
|
||||
* ServiceResponse message to encapsulate it.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .grpc.reflection.v1alpha.ServiceResponse service = 1;</code>
|
||||
*/
|
||||
public Builder removeService(int index) {
|
||||
if (serviceBuilder_ == null) {
|
||||
ensureServiceIsMutable();
|
||||
service_.remove(index);
|
||||
onChanged();
|
||||
} else {
|
||||
serviceBuilder_.remove(index);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The information of each service may be expanded in the future, so we use
|
||||
* ServiceResponse message to encapsulate it.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .grpc.reflection.v1alpha.ServiceResponse service = 1;</code>
|
||||
*/
|
||||
public io.grpc.reflection.v1alpha.ServiceResponse.Builder getServiceBuilder(
|
||||
int index) {
|
||||
return getServiceFieldBuilder().getBuilder(index);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The information of each service may be expanded in the future, so we use
|
||||
* ServiceResponse message to encapsulate it.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .grpc.reflection.v1alpha.ServiceResponse service = 1;</code>
|
||||
*/
|
||||
public io.grpc.reflection.v1alpha.ServiceResponseOrBuilder getServiceOrBuilder(
|
||||
int index) {
|
||||
if (serviceBuilder_ == null) {
|
||||
return service_.get(index); } else {
|
||||
return serviceBuilder_.getMessageOrBuilder(index);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The information of each service may be expanded in the future, so we use
|
||||
* ServiceResponse message to encapsulate it.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .grpc.reflection.v1alpha.ServiceResponse service = 1;</code>
|
||||
*/
|
||||
public java.util.List<? extends io.grpc.reflection.v1alpha.ServiceResponseOrBuilder>
|
||||
getServiceOrBuilderList() {
|
||||
if (serviceBuilder_ != null) {
|
||||
return serviceBuilder_.getMessageOrBuilderList();
|
||||
} else {
|
||||
return java.util.Collections.unmodifiableList(service_);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The information of each service may be expanded in the future, so we use
|
||||
* ServiceResponse message to encapsulate it.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .grpc.reflection.v1alpha.ServiceResponse service = 1;</code>
|
||||
*/
|
||||
public io.grpc.reflection.v1alpha.ServiceResponse.Builder addServiceBuilder() {
|
||||
return getServiceFieldBuilder().addBuilder(
|
||||
io.grpc.reflection.v1alpha.ServiceResponse.getDefaultInstance());
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The information of each service may be expanded in the future, so we use
|
||||
* ServiceResponse message to encapsulate it.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .grpc.reflection.v1alpha.ServiceResponse service = 1;</code>
|
||||
*/
|
||||
public io.grpc.reflection.v1alpha.ServiceResponse.Builder addServiceBuilder(
|
||||
int index) {
|
||||
return getServiceFieldBuilder().addBuilder(
|
||||
index, io.grpc.reflection.v1alpha.ServiceResponse.getDefaultInstance());
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The information of each service may be expanded in the future, so we use
|
||||
* ServiceResponse message to encapsulate it.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .grpc.reflection.v1alpha.ServiceResponse service = 1;</code>
|
||||
*/
|
||||
public java.util.List<io.grpc.reflection.v1alpha.ServiceResponse.Builder>
|
||||
getServiceBuilderList() {
|
||||
return getServiceFieldBuilder().getBuilderList();
|
||||
}
|
||||
private com.google.protobuf.RepeatedFieldBuilderV3<
|
||||
io.grpc.reflection.v1alpha.ServiceResponse, io.grpc.reflection.v1alpha.ServiceResponse.Builder, io.grpc.reflection.v1alpha.ServiceResponseOrBuilder>
|
||||
getServiceFieldBuilder() {
|
||||
if (serviceBuilder_ == null) {
|
||||
serviceBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
|
||||
io.grpc.reflection.v1alpha.ServiceResponse, io.grpc.reflection.v1alpha.ServiceResponse.Builder, io.grpc.reflection.v1alpha.ServiceResponseOrBuilder>(
|
||||
service_,
|
||||
((bitField0_ & 0x00000001) == 0x00000001),
|
||||
getParentForChildren(),
|
||||
isClean());
|
||||
service_ = null;
|
||||
}
|
||||
return serviceBuilder_;
|
||||
}
|
||||
public final Builder setUnknownFields(
|
||||
final com.google.protobuf.UnknownFieldSet unknownFields) {
|
||||
return this;
|
||||
}
|
||||
|
||||
public final Builder mergeUnknownFields(
|
||||
final com.google.protobuf.UnknownFieldSet unknownFields) {
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
// @@protoc_insertion_point(builder_scope:grpc.reflection.v1alpha.ListServiceResponse)
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:grpc.reflection.v1alpha.ListServiceResponse)
|
||||
private static final io.grpc.reflection.v1alpha.ListServiceResponse DEFAULT_INSTANCE;
|
||||
static {
|
||||
DEFAULT_INSTANCE = new io.grpc.reflection.v1alpha.ListServiceResponse();
|
||||
}
|
||||
|
||||
public static io.grpc.reflection.v1alpha.ListServiceResponse getDefaultInstance() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
private static final com.google.protobuf.Parser<ListServiceResponse>
|
||||
PARSER = new com.google.protobuf.AbstractParser<ListServiceResponse>() {
|
||||
public ListServiceResponse parsePartialFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return new ListServiceResponse(input, extensionRegistry);
|
||||
}
|
||||
};
|
||||
|
||||
public static com.google.protobuf.Parser<ListServiceResponse> parser() {
|
||||
return PARSER;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public com.google.protobuf.Parser<ListServiceResponse> getParserForType() {
|
||||
return PARSER;
|
||||
}
|
||||
|
||||
public io.grpc.reflection.v1alpha.ListServiceResponse getDefaultInstanceForType() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: io/grpc/reflection/v1alpha/reflection.proto
|
||||
|
||||
package io.grpc.reflection.v1alpha;
|
||||
|
||||
public interface ListServiceResponseOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:grpc.reflection.v1alpha.ListServiceResponse)
|
||||
com.google.protobuf.MessageOrBuilder {
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The information of each service may be expanded in the future, so we use
|
||||
* ServiceResponse message to encapsulate it.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .grpc.reflection.v1alpha.ServiceResponse service = 1;</code>
|
||||
*/
|
||||
java.util.List<io.grpc.reflection.v1alpha.ServiceResponse>
|
||||
getServiceList();
|
||||
/**
|
||||
* <pre>
|
||||
* The information of each service may be expanded in the future, so we use
|
||||
* ServiceResponse message to encapsulate it.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .grpc.reflection.v1alpha.ServiceResponse service = 1;</code>
|
||||
*/
|
||||
io.grpc.reflection.v1alpha.ServiceResponse getService(int index);
|
||||
/**
|
||||
* <pre>
|
||||
* The information of each service may be expanded in the future, so we use
|
||||
* ServiceResponse message to encapsulate it.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .grpc.reflection.v1alpha.ServiceResponse service = 1;</code>
|
||||
*/
|
||||
int getServiceCount();
|
||||
/**
|
||||
* <pre>
|
||||
* The information of each service may be expanded in the future, so we use
|
||||
* ServiceResponse message to encapsulate it.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .grpc.reflection.v1alpha.ServiceResponse service = 1;</code>
|
||||
*/
|
||||
java.util.List<? extends io.grpc.reflection.v1alpha.ServiceResponseOrBuilder>
|
||||
getServiceOrBuilderList();
|
||||
/**
|
||||
* <pre>
|
||||
* The information of each service may be expanded in the future, so we use
|
||||
* ServiceResponse message to encapsulate it.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .grpc.reflection.v1alpha.ServiceResponse service = 1;</code>
|
||||
*/
|
||||
io.grpc.reflection.v1alpha.ServiceResponseOrBuilder getServiceOrBuilder(
|
||||
int index);
|
||||
}
|
||||
|
|
@ -0,0 +1,165 @@
|
|||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: io/grpc/reflection/v1alpha/reflection.proto
|
||||
|
||||
package io.grpc.reflection.v1alpha;
|
||||
|
||||
public final class ServerReflectionProto {
|
||||
private ServerReflectionProto() {}
|
||||
public static void registerAllExtensions(
|
||||
com.google.protobuf.ExtensionRegistryLite registry) {
|
||||
}
|
||||
|
||||
public static void registerAllExtensions(
|
||||
com.google.protobuf.ExtensionRegistry registry) {
|
||||
registerAllExtensions(
|
||||
(com.google.protobuf.ExtensionRegistryLite) registry);
|
||||
}
|
||||
static final com.google.protobuf.Descriptors.Descriptor
|
||||
internal_static_grpc_reflection_v1alpha_ServerReflectionRequest_descriptor;
|
||||
static final
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internal_static_grpc_reflection_v1alpha_ServerReflectionRequest_fieldAccessorTable;
|
||||
static final com.google.protobuf.Descriptors.Descriptor
|
||||
internal_static_grpc_reflection_v1alpha_ExtensionRequest_descriptor;
|
||||
static final
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internal_static_grpc_reflection_v1alpha_ExtensionRequest_fieldAccessorTable;
|
||||
static final com.google.protobuf.Descriptors.Descriptor
|
||||
internal_static_grpc_reflection_v1alpha_ServerReflectionResponse_descriptor;
|
||||
static final
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internal_static_grpc_reflection_v1alpha_ServerReflectionResponse_fieldAccessorTable;
|
||||
static final com.google.protobuf.Descriptors.Descriptor
|
||||
internal_static_grpc_reflection_v1alpha_FileDescriptorResponse_descriptor;
|
||||
static final
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internal_static_grpc_reflection_v1alpha_FileDescriptorResponse_fieldAccessorTable;
|
||||
static final com.google.protobuf.Descriptors.Descriptor
|
||||
internal_static_grpc_reflection_v1alpha_ExtensionNumberResponse_descriptor;
|
||||
static final
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internal_static_grpc_reflection_v1alpha_ExtensionNumberResponse_fieldAccessorTable;
|
||||
static final com.google.protobuf.Descriptors.Descriptor
|
||||
internal_static_grpc_reflection_v1alpha_ListServiceResponse_descriptor;
|
||||
static final
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internal_static_grpc_reflection_v1alpha_ListServiceResponse_fieldAccessorTable;
|
||||
static final com.google.protobuf.Descriptors.Descriptor
|
||||
internal_static_grpc_reflection_v1alpha_ServiceResponse_descriptor;
|
||||
static final
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internal_static_grpc_reflection_v1alpha_ServiceResponse_fieldAccessorTable;
|
||||
static final com.google.protobuf.Descriptors.Descriptor
|
||||
internal_static_grpc_reflection_v1alpha_ErrorResponse_descriptor;
|
||||
static final
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internal_static_grpc_reflection_v1alpha_ErrorResponse_fieldAccessorTable;
|
||||
|
||||
public static com.google.protobuf.Descriptors.FileDescriptor
|
||||
getDescriptor() {
|
||||
return descriptor;
|
||||
}
|
||||
private static com.google.protobuf.Descriptors.FileDescriptor
|
||||
descriptor;
|
||||
static {
|
||||
java.lang.String[] descriptorData = {
|
||||
"\n+io/grpc/reflection/v1alpha/reflection." +
|
||||
"proto\022\027grpc.reflection.v1alpha\"\212\002\n\027Serve" +
|
||||
"rReflectionRequest\022\014\n\004host\030\001 \001(\t\022\032\n\020file" +
|
||||
"_by_filename\030\003 \001(\tH\000\022 \n\026file_containing_" +
|
||||
"symbol\030\004 \001(\tH\000\022N\n\031file_containing_extens" +
|
||||
"ion\030\005 \001(\0132).grpc.reflection.v1alpha.Exte" +
|
||||
"nsionRequestH\000\022\'\n\035all_extension_numbers_" +
|
||||
"of_type\030\006 \001(\tH\000\022\027\n\rlist_services\030\007 \001(\tH\000" +
|
||||
"B\021\n\017message_request\"E\n\020ExtensionRequest\022" +
|
||||
"\027\n\017containing_type\030\001 \001(\t\022\030\n\020extension_nu",
|
||||
"mber\030\002 \001(\005\"\321\003\n\030ServerReflectionResponse\022" +
|
||||
"\022\n\nvalid_host\030\001 \001(\t\022J\n\020original_request\030" +
|
||||
"\002 \001(\01320.grpc.reflection.v1alpha.ServerRe" +
|
||||
"flectionRequest\022S\n\030file_descriptor_respo" +
|
||||
"nse\030\004 \001(\0132/.grpc.reflection.v1alpha.File" +
|
||||
"DescriptorResponseH\000\022Z\n\036all_extension_nu" +
|
||||
"mbers_response\030\005 \001(\01320.grpc.reflection.v" +
|
||||
"1alpha.ExtensionNumberResponseH\000\022N\n\026list" +
|
||||
"_services_response\030\006 \001(\0132,.grpc.reflecti" +
|
||||
"on.v1alpha.ListServiceResponseH\000\022@\n\016erro",
|
||||
"r_response\030\007 \001(\0132&.grpc.reflection.v1alp" +
|
||||
"ha.ErrorResponseH\000B\022\n\020message_response\"7" +
|
||||
"\n\026FileDescriptorResponse\022\035\n\025file_descrip" +
|
||||
"tor_proto\030\001 \003(\014\"K\n\027ExtensionNumberRespon" +
|
||||
"se\022\026\n\016base_type_name\030\001 \001(\t\022\030\n\020extension_" +
|
||||
"number\030\002 \003(\005\"P\n\023ListServiceResponse\0229\n\007s" +
|
||||
"ervice\030\001 \003(\0132(.grpc.reflection.v1alpha.S" +
|
||||
"erviceResponse\"\037\n\017ServiceResponse\022\014\n\004nam" +
|
||||
"e\030\001 \001(\t\":\n\rErrorResponse\022\022\n\nerror_code\030\001" +
|
||||
" \001(\005\022\025\n\rerror_message\030\002 \001(\t2\223\001\n\020ServerRe",
|
||||
"flection\022\177\n\024ServerReflectionInfo\0220.grpc." +
|
||||
"reflection.v1alpha.ServerReflectionReque" +
|
||||
"st\0321.grpc.reflection.v1alpha.ServerRefle" +
|
||||
"ctionResponse(\0010\001B5\n\032io.grpc.reflection." +
|
||||
"v1alphaB\025ServerReflectionProtoP\001b\006proto3"
|
||||
};
|
||||
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
|
||||
new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() {
|
||||
public com.google.protobuf.ExtensionRegistry assignDescriptors(
|
||||
com.google.protobuf.Descriptors.FileDescriptor root) {
|
||||
descriptor = root;
|
||||
return null;
|
||||
}
|
||||
};
|
||||
com.google.protobuf.Descriptors.FileDescriptor
|
||||
.internalBuildGeneratedFileFrom(descriptorData,
|
||||
new com.google.protobuf.Descriptors.FileDescriptor[] {
|
||||
}, assigner);
|
||||
internal_static_grpc_reflection_v1alpha_ServerReflectionRequest_descriptor =
|
||||
getDescriptor().getMessageTypes().get(0);
|
||||
internal_static_grpc_reflection_v1alpha_ServerReflectionRequest_fieldAccessorTable = new
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
|
||||
internal_static_grpc_reflection_v1alpha_ServerReflectionRequest_descriptor,
|
||||
new java.lang.String[] { "Host", "FileByFilename", "FileContainingSymbol", "FileContainingExtension", "AllExtensionNumbersOfType", "ListServices", "MessageRequest", });
|
||||
internal_static_grpc_reflection_v1alpha_ExtensionRequest_descriptor =
|
||||
getDescriptor().getMessageTypes().get(1);
|
||||
internal_static_grpc_reflection_v1alpha_ExtensionRequest_fieldAccessorTable = new
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
|
||||
internal_static_grpc_reflection_v1alpha_ExtensionRequest_descriptor,
|
||||
new java.lang.String[] { "ContainingType", "ExtensionNumber", });
|
||||
internal_static_grpc_reflection_v1alpha_ServerReflectionResponse_descriptor =
|
||||
getDescriptor().getMessageTypes().get(2);
|
||||
internal_static_grpc_reflection_v1alpha_ServerReflectionResponse_fieldAccessorTable = new
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
|
||||
internal_static_grpc_reflection_v1alpha_ServerReflectionResponse_descriptor,
|
||||
new java.lang.String[] { "ValidHost", "OriginalRequest", "FileDescriptorResponse", "AllExtensionNumbersResponse", "ListServicesResponse", "ErrorResponse", "MessageResponse", });
|
||||
internal_static_grpc_reflection_v1alpha_FileDescriptorResponse_descriptor =
|
||||
getDescriptor().getMessageTypes().get(3);
|
||||
internal_static_grpc_reflection_v1alpha_FileDescriptorResponse_fieldAccessorTable = new
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
|
||||
internal_static_grpc_reflection_v1alpha_FileDescriptorResponse_descriptor,
|
||||
new java.lang.String[] { "FileDescriptorProto", });
|
||||
internal_static_grpc_reflection_v1alpha_ExtensionNumberResponse_descriptor =
|
||||
getDescriptor().getMessageTypes().get(4);
|
||||
internal_static_grpc_reflection_v1alpha_ExtensionNumberResponse_fieldAccessorTable = new
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
|
||||
internal_static_grpc_reflection_v1alpha_ExtensionNumberResponse_descriptor,
|
||||
new java.lang.String[] { "BaseTypeName", "ExtensionNumber", });
|
||||
internal_static_grpc_reflection_v1alpha_ListServiceResponse_descriptor =
|
||||
getDescriptor().getMessageTypes().get(5);
|
||||
internal_static_grpc_reflection_v1alpha_ListServiceResponse_fieldAccessorTable = new
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
|
||||
internal_static_grpc_reflection_v1alpha_ListServiceResponse_descriptor,
|
||||
new java.lang.String[] { "Service", });
|
||||
internal_static_grpc_reflection_v1alpha_ServiceResponse_descriptor =
|
||||
getDescriptor().getMessageTypes().get(6);
|
||||
internal_static_grpc_reflection_v1alpha_ServiceResponse_fieldAccessorTable = new
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
|
||||
internal_static_grpc_reflection_v1alpha_ServiceResponse_descriptor,
|
||||
new java.lang.String[] { "Name", });
|
||||
internal_static_grpc_reflection_v1alpha_ErrorResponse_descriptor =
|
||||
getDescriptor().getMessageTypes().get(7);
|
||||
internal_static_grpc_reflection_v1alpha_ErrorResponse_fieldAccessorTable = new
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
|
||||
internal_static_grpc_reflection_v1alpha_ErrorResponse_descriptor,
|
||||
new java.lang.String[] { "ErrorCode", "ErrorMessage", });
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(outer_class_scope)
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,132 @@
|
|||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: io/grpc/reflection/v1alpha/reflection.proto
|
||||
|
||||
package io.grpc.reflection.v1alpha;
|
||||
|
||||
public interface ServerReflectionRequestOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:grpc.reflection.v1alpha.ServerReflectionRequest)
|
||||
com.google.protobuf.MessageOrBuilder {
|
||||
|
||||
/**
|
||||
* <code>optional string host = 1;</code>
|
||||
*/
|
||||
java.lang.String getHost();
|
||||
/**
|
||||
* <code>optional string host = 1;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getHostBytes();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Find a proto file by the file name.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string file_by_filename = 3;</code>
|
||||
*/
|
||||
java.lang.String getFileByFilename();
|
||||
/**
|
||||
* <pre>
|
||||
* Find a proto file by the file name.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string file_by_filename = 3;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getFileByFilenameBytes();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Find the proto file that declares the given fully-qualified symbol name.
|
||||
* This field should be a fully-qualified symbol name
|
||||
* (e.g. <package>.<service>[.<method>] or <package>.<type>).
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string file_containing_symbol = 4;</code>
|
||||
*/
|
||||
java.lang.String getFileContainingSymbol();
|
||||
/**
|
||||
* <pre>
|
||||
* Find the proto file that declares the given fully-qualified symbol name.
|
||||
* This field should be a fully-qualified symbol name
|
||||
* (e.g. <package>.<service>[.<method>] or <package>.<type>).
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string file_containing_symbol = 4;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getFileContainingSymbolBytes();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Find the proto file which defines an extension extending the given
|
||||
* message type with the given field number.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .grpc.reflection.v1alpha.ExtensionRequest file_containing_extension = 5;</code>
|
||||
*/
|
||||
io.grpc.reflection.v1alpha.ExtensionRequest getFileContainingExtension();
|
||||
/**
|
||||
* <pre>
|
||||
* Find the proto file which defines an extension extending the given
|
||||
* message type with the given field number.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .grpc.reflection.v1alpha.ExtensionRequest file_containing_extension = 5;</code>
|
||||
*/
|
||||
io.grpc.reflection.v1alpha.ExtensionRequestOrBuilder getFileContainingExtensionOrBuilder();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Finds the tag numbers used by all known extensions of extendee_type, and
|
||||
* appends them to ExtensionNumberResponse in an undefined order.
|
||||
* Its corresponding method is best-effort: it's not guaranteed that the
|
||||
* reflection service will implement this method, and it's not guaranteed
|
||||
* that this method will provide all extensions. Returns
|
||||
* StatusCode::UNIMPLEMENTED if it's not implemented.
|
||||
* This field should be a fully-qualified type name. The format is
|
||||
* <package>.<type>
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string all_extension_numbers_of_type = 6;</code>
|
||||
*/
|
||||
java.lang.String getAllExtensionNumbersOfType();
|
||||
/**
|
||||
* <pre>
|
||||
* Finds the tag numbers used by all known extensions of extendee_type, and
|
||||
* appends them to ExtensionNumberResponse in an undefined order.
|
||||
* Its corresponding method is best-effort: it's not guaranteed that the
|
||||
* reflection service will implement this method, and it's not guaranteed
|
||||
* that this method will provide all extensions. Returns
|
||||
* StatusCode::UNIMPLEMENTED if it's not implemented.
|
||||
* This field should be a fully-qualified type name. The format is
|
||||
* <package>.<type>
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string all_extension_numbers_of_type = 6;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getAllExtensionNumbersOfTypeBytes();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* List the full names of registered services. The content will not be
|
||||
* checked.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string list_services = 7;</code>
|
||||
*/
|
||||
java.lang.String getListServices();
|
||||
/**
|
||||
* <pre>
|
||||
* List the full names of registered services. The content will not be
|
||||
* checked.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string list_services = 7;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getListServicesBytes();
|
||||
|
||||
public io.grpc.reflection.v1alpha.ServerReflectionRequest.MessageRequestCase getMessageRequestCase();
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,112 @@
|
|||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: io/grpc/reflection/v1alpha/reflection.proto
|
||||
|
||||
package io.grpc.reflection.v1alpha;
|
||||
|
||||
public interface ServerReflectionResponseOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:grpc.reflection.v1alpha.ServerReflectionResponse)
|
||||
com.google.protobuf.MessageOrBuilder {
|
||||
|
||||
/**
|
||||
* <code>optional string valid_host = 1;</code>
|
||||
*/
|
||||
java.lang.String getValidHost();
|
||||
/**
|
||||
* <code>optional string valid_host = 1;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getValidHostBytes();
|
||||
|
||||
/**
|
||||
* <code>optional .grpc.reflection.v1alpha.ServerReflectionRequest original_request = 2;</code>
|
||||
*/
|
||||
boolean hasOriginalRequest();
|
||||
/**
|
||||
* <code>optional .grpc.reflection.v1alpha.ServerReflectionRequest original_request = 2;</code>
|
||||
*/
|
||||
io.grpc.reflection.v1alpha.ServerReflectionRequest getOriginalRequest();
|
||||
/**
|
||||
* <code>optional .grpc.reflection.v1alpha.ServerReflectionRequest original_request = 2;</code>
|
||||
*/
|
||||
io.grpc.reflection.v1alpha.ServerReflectionRequestOrBuilder getOriginalRequestOrBuilder();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* This message is used to answer file_by_filename, file_containing_symbol,
|
||||
* file_containing_extension requests with transitive dependencies. As
|
||||
* the repeated label is not allowed in oneof fields, we use a
|
||||
* FileDescriptorResponse message to encapsulate the repeated fields.
|
||||
* The reflection service is allowed to avoid sending FileDescriptorProtos
|
||||
* that were previously sent in response to earlier requests in the stream.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .grpc.reflection.v1alpha.FileDescriptorResponse file_descriptor_response = 4;</code>
|
||||
*/
|
||||
io.grpc.reflection.v1alpha.FileDescriptorResponse getFileDescriptorResponse();
|
||||
/**
|
||||
* <pre>
|
||||
* This message is used to answer file_by_filename, file_containing_symbol,
|
||||
* file_containing_extension requests with transitive dependencies. As
|
||||
* the repeated label is not allowed in oneof fields, we use a
|
||||
* FileDescriptorResponse message to encapsulate the repeated fields.
|
||||
* The reflection service is allowed to avoid sending FileDescriptorProtos
|
||||
* that were previously sent in response to earlier requests in the stream.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .grpc.reflection.v1alpha.FileDescriptorResponse file_descriptor_response = 4;</code>
|
||||
*/
|
||||
io.grpc.reflection.v1alpha.FileDescriptorResponseOrBuilder getFileDescriptorResponseOrBuilder();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* This message is used to answer all_extension_numbers_of_type requst.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .grpc.reflection.v1alpha.ExtensionNumberResponse all_extension_numbers_response = 5;</code>
|
||||
*/
|
||||
io.grpc.reflection.v1alpha.ExtensionNumberResponse getAllExtensionNumbersResponse();
|
||||
/**
|
||||
* <pre>
|
||||
* This message is used to answer all_extension_numbers_of_type requst.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .grpc.reflection.v1alpha.ExtensionNumberResponse all_extension_numbers_response = 5;</code>
|
||||
*/
|
||||
io.grpc.reflection.v1alpha.ExtensionNumberResponseOrBuilder getAllExtensionNumbersResponseOrBuilder();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* This message is used to answer list_services request.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .grpc.reflection.v1alpha.ListServiceResponse list_services_response = 6;</code>
|
||||
*/
|
||||
io.grpc.reflection.v1alpha.ListServiceResponse getListServicesResponse();
|
||||
/**
|
||||
* <pre>
|
||||
* This message is used to answer list_services request.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .grpc.reflection.v1alpha.ListServiceResponse list_services_response = 6;</code>
|
||||
*/
|
||||
io.grpc.reflection.v1alpha.ListServiceResponseOrBuilder getListServicesResponseOrBuilder();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* This message is used when an error occurs.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .grpc.reflection.v1alpha.ErrorResponse error_response = 7;</code>
|
||||
*/
|
||||
io.grpc.reflection.v1alpha.ErrorResponse getErrorResponse();
|
||||
/**
|
||||
* <pre>
|
||||
* This message is used when an error occurs.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .grpc.reflection.v1alpha.ErrorResponse error_response = 7;</code>
|
||||
*/
|
||||
io.grpc.reflection.v1alpha.ErrorResponseOrBuilder getErrorResponseOrBuilder();
|
||||
|
||||
public io.grpc.reflection.v1alpha.ServerReflectionResponse.MessageResponseCase getMessageResponseCase();
|
||||
}
|
||||
|
|
@ -0,0 +1,539 @@
|
|||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: io/grpc/reflection/v1alpha/reflection.proto
|
||||
|
||||
package io.grpc.reflection.v1alpha;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The information of a single service used by ListServiceResponse to answer
|
||||
* list_services request.
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code grpc.reflection.v1alpha.ServiceResponse}
|
||||
*/
|
||||
public final class ServiceResponse extends
|
||||
com.google.protobuf.GeneratedMessageV3 implements
|
||||
// @@protoc_insertion_point(message_implements:grpc.reflection.v1alpha.ServiceResponse)
|
||||
ServiceResponseOrBuilder {
|
||||
// Use ServiceResponse.newBuilder() to construct.
|
||||
private ServiceResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
|
||||
super(builder);
|
||||
}
|
||||
private ServiceResponse() {
|
||||
name_ = "";
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public final com.google.protobuf.UnknownFieldSet
|
||||
getUnknownFields() {
|
||||
return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
|
||||
}
|
||||
private ServiceResponse(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
this();
|
||||
int mutable_bitField0_ = 0;
|
||||
try {
|
||||
boolean done = false;
|
||||
while (!done) {
|
||||
int tag = input.readTag();
|
||||
switch (tag) {
|
||||
case 0:
|
||||
done = true;
|
||||
break;
|
||||
default: {
|
||||
if (!input.skipField(tag)) {
|
||||
done = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 10: {
|
||||
java.lang.String s = input.readStringRequireUtf8();
|
||||
|
||||
name_ = s;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||
throw e.setUnfinishedMessage(this);
|
||||
} catch (java.io.IOException e) {
|
||||
throw new com.google.protobuf.InvalidProtocolBufferException(
|
||||
e).setUnfinishedMessage(this);
|
||||
} finally {
|
||||
makeExtensionsImmutable();
|
||||
}
|
||||
}
|
||||
public static final com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptor() {
|
||||
return io.grpc.reflection.v1alpha.ServerReflectionProto.internal_static_grpc_reflection_v1alpha_ServiceResponse_descriptor;
|
||||
}
|
||||
|
||||
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internalGetFieldAccessorTable() {
|
||||
return io.grpc.reflection.v1alpha.ServerReflectionProto.internal_static_grpc_reflection_v1alpha_ServiceResponse_fieldAccessorTable
|
||||
.ensureFieldAccessorsInitialized(
|
||||
io.grpc.reflection.v1alpha.ServiceResponse.class, io.grpc.reflection.v1alpha.ServiceResponse.Builder.class);
|
||||
}
|
||||
|
||||
public static final int NAME_FIELD_NUMBER = 1;
|
||||
private volatile java.lang.Object name_;
|
||||
/**
|
||||
* <pre>
|
||||
* Full name of a registered service, including its package name. The format
|
||||
* is <package>.<service>
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string name = 1;</code>
|
||||
*/
|
||||
public java.lang.String getName() {
|
||||
java.lang.Object ref = name_;
|
||||
if (ref instanceof java.lang.String) {
|
||||
return (java.lang.String) ref;
|
||||
} else {
|
||||
com.google.protobuf.ByteString bs =
|
||||
(com.google.protobuf.ByteString) ref;
|
||||
java.lang.String s = bs.toStringUtf8();
|
||||
name_ = s;
|
||||
return s;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Full name of a registered service, including its package name. The format
|
||||
* is <package>.<service>
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string name = 1;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getNameBytes() {
|
||||
java.lang.Object ref = name_;
|
||||
if (ref instanceof java.lang.String) {
|
||||
com.google.protobuf.ByteString b =
|
||||
com.google.protobuf.ByteString.copyFromUtf8(
|
||||
(java.lang.String) ref);
|
||||
name_ = b;
|
||||
return b;
|
||||
} else {
|
||||
return (com.google.protobuf.ByteString) ref;
|
||||
}
|
||||
}
|
||||
|
||||
private byte memoizedIsInitialized = -1;
|
||||
public final boolean isInitialized() {
|
||||
byte isInitialized = memoizedIsInitialized;
|
||||
if (isInitialized == 1) return true;
|
||||
if (isInitialized == 0) return false;
|
||||
|
||||
memoizedIsInitialized = 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
public void writeTo(com.google.protobuf.CodedOutputStream output)
|
||||
throws java.io.IOException {
|
||||
if (!getNameBytes().isEmpty()) {
|
||||
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
|
||||
}
|
||||
}
|
||||
|
||||
public int getSerializedSize() {
|
||||
int size = memoizedSize;
|
||||
if (size != -1) return size;
|
||||
|
||||
size = 0;
|
||||
if (!getNameBytes().isEmpty()) {
|
||||
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
|
||||
}
|
||||
memoizedSize = size;
|
||||
return size;
|
||||
}
|
||||
|
||||
private static final long serialVersionUID = 0L;
|
||||
@java.lang.Override
|
||||
public boolean equals(final java.lang.Object obj) {
|
||||
if (obj == this) {
|
||||
return true;
|
||||
}
|
||||
if (!(obj instanceof io.grpc.reflection.v1alpha.ServiceResponse)) {
|
||||
return super.equals(obj);
|
||||
}
|
||||
io.grpc.reflection.v1alpha.ServiceResponse other = (io.grpc.reflection.v1alpha.ServiceResponse) obj;
|
||||
|
||||
boolean result = true;
|
||||
result = result && getName()
|
||||
.equals(other.getName());
|
||||
return result;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public int hashCode() {
|
||||
if (memoizedHashCode != 0) {
|
||||
return memoizedHashCode;
|
||||
}
|
||||
int hash = 41;
|
||||
hash = (19 * hash) + getDescriptorForType().hashCode();
|
||||
hash = (37 * hash) + NAME_FIELD_NUMBER;
|
||||
hash = (53 * hash) + getName().hashCode();
|
||||
hash = (29 * hash) + unknownFields.hashCode();
|
||||
memoizedHashCode = hash;
|
||||
return hash;
|
||||
}
|
||||
|
||||
public static io.grpc.reflection.v1alpha.ServiceResponse parseFrom(
|
||||
com.google.protobuf.ByteString data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static io.grpc.reflection.v1alpha.ServiceResponse parseFrom(
|
||||
com.google.protobuf.ByteString data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
public static io.grpc.reflection.v1alpha.ServiceResponse parseFrom(byte[] data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static io.grpc.reflection.v1alpha.ServiceResponse parseFrom(
|
||||
byte[] data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
public static io.grpc.reflection.v1alpha.ServiceResponse parseFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input);
|
||||
}
|
||||
public static io.grpc.reflection.v1alpha.ServiceResponse parseFrom(
|
||||
java.io.InputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
public static io.grpc.reflection.v1alpha.ServiceResponse parseDelimitedFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseDelimitedWithIOException(PARSER, input);
|
||||
}
|
||||
public static io.grpc.reflection.v1alpha.ServiceResponse parseDelimitedFrom(
|
||||
java.io.InputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
public static io.grpc.reflection.v1alpha.ServiceResponse parseFrom(
|
||||
com.google.protobuf.CodedInputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input);
|
||||
}
|
||||
public static io.grpc.reflection.v1alpha.ServiceResponse parseFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
|
||||
public Builder newBuilderForType() { return newBuilder(); }
|
||||
public static Builder newBuilder() {
|
||||
return DEFAULT_INSTANCE.toBuilder();
|
||||
}
|
||||
public static Builder newBuilder(io.grpc.reflection.v1alpha.ServiceResponse prototype) {
|
||||
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
|
||||
}
|
||||
public Builder toBuilder() {
|
||||
return this == DEFAULT_INSTANCE
|
||||
? new Builder() : new Builder().mergeFrom(this);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
protected Builder newBuilderForType(
|
||||
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
|
||||
Builder builder = new Builder(parent);
|
||||
return builder;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The information of a single service used by ListServiceResponse to answer
|
||||
* list_services request.
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code grpc.reflection.v1alpha.ServiceResponse}
|
||||
*/
|
||||
public static final class Builder extends
|
||||
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
|
||||
// @@protoc_insertion_point(builder_implements:grpc.reflection.v1alpha.ServiceResponse)
|
||||
io.grpc.reflection.v1alpha.ServiceResponseOrBuilder {
|
||||
public static final com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptor() {
|
||||
return io.grpc.reflection.v1alpha.ServerReflectionProto.internal_static_grpc_reflection_v1alpha_ServiceResponse_descriptor;
|
||||
}
|
||||
|
||||
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internalGetFieldAccessorTable() {
|
||||
return io.grpc.reflection.v1alpha.ServerReflectionProto.internal_static_grpc_reflection_v1alpha_ServiceResponse_fieldAccessorTable
|
||||
.ensureFieldAccessorsInitialized(
|
||||
io.grpc.reflection.v1alpha.ServiceResponse.class, io.grpc.reflection.v1alpha.ServiceResponse.Builder.class);
|
||||
}
|
||||
|
||||
// Construct using io.grpc.reflection.v1alpha.ServiceResponse.newBuilder()
|
||||
private Builder() {
|
||||
maybeForceBuilderInitialization();
|
||||
}
|
||||
|
||||
private Builder(
|
||||
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
|
||||
super(parent);
|
||||
maybeForceBuilderInitialization();
|
||||
}
|
||||
private void maybeForceBuilderInitialization() {
|
||||
if (com.google.protobuf.GeneratedMessageV3
|
||||
.alwaysUseFieldBuilders) {
|
||||
}
|
||||
}
|
||||
public Builder clear() {
|
||||
super.clear();
|
||||
name_ = "";
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
public com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptorForType() {
|
||||
return io.grpc.reflection.v1alpha.ServerReflectionProto.internal_static_grpc_reflection_v1alpha_ServiceResponse_descriptor;
|
||||
}
|
||||
|
||||
public io.grpc.reflection.v1alpha.ServiceResponse getDefaultInstanceForType() {
|
||||
return io.grpc.reflection.v1alpha.ServiceResponse.getDefaultInstance();
|
||||
}
|
||||
|
||||
public io.grpc.reflection.v1alpha.ServiceResponse build() {
|
||||
io.grpc.reflection.v1alpha.ServiceResponse result = buildPartial();
|
||||
if (!result.isInitialized()) {
|
||||
throw newUninitializedMessageException(result);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public io.grpc.reflection.v1alpha.ServiceResponse buildPartial() {
|
||||
io.grpc.reflection.v1alpha.ServiceResponse result = new io.grpc.reflection.v1alpha.ServiceResponse(this);
|
||||
result.name_ = name_;
|
||||
onBuilt();
|
||||
return result;
|
||||
}
|
||||
|
||||
public Builder clone() {
|
||||
return (Builder) super.clone();
|
||||
}
|
||||
public Builder setField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||
Object value) {
|
||||
return (Builder) super.setField(field, value);
|
||||
}
|
||||
public Builder clearField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field) {
|
||||
return (Builder) super.clearField(field);
|
||||
}
|
||||
public Builder clearOneof(
|
||||
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
|
||||
return (Builder) super.clearOneof(oneof);
|
||||
}
|
||||
public Builder setRepeatedField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||
int index, Object value) {
|
||||
return (Builder) super.setRepeatedField(field, index, value);
|
||||
}
|
||||
public Builder addRepeatedField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||
Object value) {
|
||||
return (Builder) super.addRepeatedField(field, value);
|
||||
}
|
||||
public Builder mergeFrom(com.google.protobuf.Message other) {
|
||||
if (other instanceof io.grpc.reflection.v1alpha.ServiceResponse) {
|
||||
return mergeFrom((io.grpc.reflection.v1alpha.ServiceResponse)other);
|
||||
} else {
|
||||
super.mergeFrom(other);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
public Builder mergeFrom(io.grpc.reflection.v1alpha.ServiceResponse other) {
|
||||
if (other == io.grpc.reflection.v1alpha.ServiceResponse.getDefaultInstance()) return this;
|
||||
if (!other.getName().isEmpty()) {
|
||||
name_ = other.name_;
|
||||
onChanged();
|
||||
}
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
|
||||
public final boolean isInitialized() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public Builder mergeFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
io.grpc.reflection.v1alpha.ServiceResponse parsedMessage = null;
|
||||
try {
|
||||
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
|
||||
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||
parsedMessage = (io.grpc.reflection.v1alpha.ServiceResponse) e.getUnfinishedMessage();
|
||||
throw e.unwrapIOException();
|
||||
} finally {
|
||||
if (parsedMessage != null) {
|
||||
mergeFrom(parsedMessage);
|
||||
}
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
private java.lang.Object name_ = "";
|
||||
/**
|
||||
* <pre>
|
||||
* Full name of a registered service, including its package name. The format
|
||||
* is <package>.<service>
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string name = 1;</code>
|
||||
*/
|
||||
public java.lang.String getName() {
|
||||
java.lang.Object ref = name_;
|
||||
if (!(ref instanceof java.lang.String)) {
|
||||
com.google.protobuf.ByteString bs =
|
||||
(com.google.protobuf.ByteString) ref;
|
||||
java.lang.String s = bs.toStringUtf8();
|
||||
name_ = s;
|
||||
return s;
|
||||
} else {
|
||||
return (java.lang.String) ref;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Full name of a registered service, including its package name. The format
|
||||
* is <package>.<service>
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string name = 1;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getNameBytes() {
|
||||
java.lang.Object ref = name_;
|
||||
if (ref instanceof String) {
|
||||
com.google.protobuf.ByteString b =
|
||||
com.google.protobuf.ByteString.copyFromUtf8(
|
||||
(java.lang.String) ref);
|
||||
name_ = b;
|
||||
return b;
|
||||
} else {
|
||||
return (com.google.protobuf.ByteString) ref;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Full name of a registered service, including its package name. The format
|
||||
* is <package>.<service>
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string name = 1;</code>
|
||||
*/
|
||||
public Builder setName(
|
||||
java.lang.String value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
|
||||
name_ = value;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Full name of a registered service, including its package name. The format
|
||||
* is <package>.<service>
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string name = 1;</code>
|
||||
*/
|
||||
public Builder clearName() {
|
||||
|
||||
name_ = getDefaultInstance().getName();
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Full name of a registered service, including its package name. The format
|
||||
* is <package>.<service>
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string name = 1;</code>
|
||||
*/
|
||||
public Builder setNameBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
checkByteStringIsUtf8(value);
|
||||
|
||||
name_ = value;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
public final Builder setUnknownFields(
|
||||
final com.google.protobuf.UnknownFieldSet unknownFields) {
|
||||
return this;
|
||||
}
|
||||
|
||||
public final Builder mergeUnknownFields(
|
||||
final com.google.protobuf.UnknownFieldSet unknownFields) {
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
// @@protoc_insertion_point(builder_scope:grpc.reflection.v1alpha.ServiceResponse)
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:grpc.reflection.v1alpha.ServiceResponse)
|
||||
private static final io.grpc.reflection.v1alpha.ServiceResponse DEFAULT_INSTANCE;
|
||||
static {
|
||||
DEFAULT_INSTANCE = new io.grpc.reflection.v1alpha.ServiceResponse();
|
||||
}
|
||||
|
||||
public static io.grpc.reflection.v1alpha.ServiceResponse getDefaultInstance() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
private static final com.google.protobuf.Parser<ServiceResponse>
|
||||
PARSER = new com.google.protobuf.AbstractParser<ServiceResponse>() {
|
||||
public ServiceResponse parsePartialFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return new ServiceResponse(input, extensionRegistry);
|
||||
}
|
||||
};
|
||||
|
||||
public static com.google.protobuf.Parser<ServiceResponse> parser() {
|
||||
return PARSER;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public com.google.protobuf.Parser<ServiceResponse> getParserForType() {
|
||||
return PARSER;
|
||||
}
|
||||
|
||||
public io.grpc.reflection.v1alpha.ServiceResponse getDefaultInstanceForType() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: io/grpc/reflection/v1alpha/reflection.proto
|
||||
|
||||
package io.grpc.reflection.v1alpha;
|
||||
|
||||
public interface ServiceResponseOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:grpc.reflection.v1alpha.ServiceResponse)
|
||||
com.google.protobuf.MessageOrBuilder {
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Full name of a registered service, including its package name. The format
|
||||
* is <package>.<service>
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string name = 1;</code>
|
||||
*/
|
||||
java.lang.String getName();
|
||||
/**
|
||||
* <pre>
|
||||
* Full name of a registered service, including its package name. The format
|
||||
* is <package>.<service>
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string name = 1;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getNameBytes();
|
||||
}
|
||||
|
|
@ -0,0 +1,224 @@
|
|||
package io.grpc.reflection.testing;
|
||||
|
||||
import static io.grpc.stub.ClientCalls.asyncUnaryCall;
|
||||
import static io.grpc.stub.ClientCalls.asyncServerStreamingCall;
|
||||
import static io.grpc.stub.ClientCalls.asyncClientStreamingCall;
|
||||
import static io.grpc.stub.ClientCalls.asyncBidiStreamingCall;
|
||||
import static io.grpc.stub.ClientCalls.blockingUnaryCall;
|
||||
import static io.grpc.stub.ClientCalls.blockingServerStreamingCall;
|
||||
import static io.grpc.stub.ClientCalls.futureUnaryCall;
|
||||
import static io.grpc.MethodDescriptor.generateFullMethodName;
|
||||
import static io.grpc.stub.ServerCalls.asyncUnaryCall;
|
||||
import static io.grpc.stub.ServerCalls.asyncServerStreamingCall;
|
||||
import static io.grpc.stub.ServerCalls.asyncClientStreamingCall;
|
||||
import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall;
|
||||
import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall;
|
||||
import static io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall;
|
||||
|
||||
/**
|
||||
*/
|
||||
@javax.annotation.Generated(
|
||||
value = "by gRPC proto compiler (version 1.1.0-SNAPSHOT)",
|
||||
comments = "Source: io/grpc/reflection/testing/reflection_test.proto")
|
||||
public class DynamicServiceGrpc {
|
||||
|
||||
private DynamicServiceGrpc() {}
|
||||
|
||||
public static final String SERVICE_NAME = "grpc.reflection.testing.DynamicService";
|
||||
|
||||
// Static method descriptors that strictly reflect the proto.
|
||||
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
|
||||
public static final io.grpc.MethodDescriptor<io.grpc.reflection.testing.Request,
|
||||
io.grpc.reflection.testing.Reply> METHOD_METHOD =
|
||||
io.grpc.MethodDescriptor.create(
|
||||
io.grpc.MethodDescriptor.MethodType.UNARY,
|
||||
generateFullMethodName(
|
||||
"grpc.reflection.testing.DynamicService", "Method"),
|
||||
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.reflection.testing.Request.getDefaultInstance()),
|
||||
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.reflection.testing.Reply.getDefaultInstance()));
|
||||
|
||||
/**
|
||||
* Creates a new async stub that supports all call types for the service
|
||||
*/
|
||||
public static DynamicServiceStub newStub(io.grpc.Channel channel) {
|
||||
return new DynamicServiceStub(channel);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
|
||||
*/
|
||||
public static DynamicServiceBlockingStub newBlockingStub(
|
||||
io.grpc.Channel channel) {
|
||||
return new DynamicServiceBlockingStub(channel);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new ListenableFuture-style stub that supports unary and streaming output calls on the service
|
||||
*/
|
||||
public static DynamicServiceFutureStub newFutureStub(
|
||||
io.grpc.Channel channel) {
|
||||
return new DynamicServiceFutureStub(channel);
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
public static abstract class DynamicServiceImplBase implements io.grpc.BindableService {
|
||||
|
||||
/**
|
||||
*/
|
||||
public void method(io.grpc.reflection.testing.Request request,
|
||||
io.grpc.stub.StreamObserver<io.grpc.reflection.testing.Reply> responseObserver) {
|
||||
asyncUnimplementedUnaryCall(METHOD_METHOD, responseObserver);
|
||||
}
|
||||
|
||||
@java.lang.Override public io.grpc.ServerServiceDefinition bindService() {
|
||||
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
|
||||
.addMethod(
|
||||
METHOD_METHOD,
|
||||
asyncUnaryCall(
|
||||
new MethodHandlers<
|
||||
io.grpc.reflection.testing.Request,
|
||||
io.grpc.reflection.testing.Reply>(
|
||||
this, METHODID_METHOD)))
|
||||
.build();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
public static final class DynamicServiceStub extends io.grpc.stub.AbstractStub<DynamicServiceStub> {
|
||||
private DynamicServiceStub(io.grpc.Channel channel) {
|
||||
super(channel);
|
||||
}
|
||||
|
||||
private DynamicServiceStub(io.grpc.Channel channel,
|
||||
io.grpc.CallOptions callOptions) {
|
||||
super(channel, callOptions);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
protected DynamicServiceStub build(io.grpc.Channel channel,
|
||||
io.grpc.CallOptions callOptions) {
|
||||
return new DynamicServiceStub(channel, callOptions);
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
public void method(io.grpc.reflection.testing.Request request,
|
||||
io.grpc.stub.StreamObserver<io.grpc.reflection.testing.Reply> responseObserver) {
|
||||
asyncUnaryCall(
|
||||
getChannel().newCall(METHOD_METHOD, getCallOptions()), request, responseObserver);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
public static final class DynamicServiceBlockingStub extends io.grpc.stub.AbstractStub<DynamicServiceBlockingStub> {
|
||||
private DynamicServiceBlockingStub(io.grpc.Channel channel) {
|
||||
super(channel);
|
||||
}
|
||||
|
||||
private DynamicServiceBlockingStub(io.grpc.Channel channel,
|
||||
io.grpc.CallOptions callOptions) {
|
||||
super(channel, callOptions);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
protected DynamicServiceBlockingStub build(io.grpc.Channel channel,
|
||||
io.grpc.CallOptions callOptions) {
|
||||
return new DynamicServiceBlockingStub(channel, callOptions);
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
public io.grpc.reflection.testing.Reply method(io.grpc.reflection.testing.Request request) {
|
||||
return blockingUnaryCall(
|
||||
getChannel(), METHOD_METHOD, getCallOptions(), request);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
public static final class DynamicServiceFutureStub extends io.grpc.stub.AbstractStub<DynamicServiceFutureStub> {
|
||||
private DynamicServiceFutureStub(io.grpc.Channel channel) {
|
||||
super(channel);
|
||||
}
|
||||
|
||||
private DynamicServiceFutureStub(io.grpc.Channel channel,
|
||||
io.grpc.CallOptions callOptions) {
|
||||
super(channel, callOptions);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
protected DynamicServiceFutureStub build(io.grpc.Channel channel,
|
||||
io.grpc.CallOptions callOptions) {
|
||||
return new DynamicServiceFutureStub(channel, callOptions);
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
public com.google.common.util.concurrent.ListenableFuture<io.grpc.reflection.testing.Reply> method(
|
||||
io.grpc.reflection.testing.Request request) {
|
||||
return futureUnaryCall(
|
||||
getChannel().newCall(METHOD_METHOD, getCallOptions()), request);
|
||||
}
|
||||
}
|
||||
|
||||
private static final int METHODID_METHOD = 0;
|
||||
|
||||
private static class MethodHandlers<Req, Resp> implements
|
||||
io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>,
|
||||
io.grpc.stub.ServerCalls.ServerStreamingMethod<Req, Resp>,
|
||||
io.grpc.stub.ServerCalls.ClientStreamingMethod<Req, Resp>,
|
||||
io.grpc.stub.ServerCalls.BidiStreamingMethod<Req, Resp> {
|
||||
private final DynamicServiceImplBase serviceImpl;
|
||||
private final int methodId;
|
||||
|
||||
public MethodHandlers(DynamicServiceImplBase serviceImpl, int methodId) {
|
||||
this.serviceImpl = serviceImpl;
|
||||
this.methodId = methodId;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
@java.lang.SuppressWarnings("unchecked")
|
||||
public void invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserver) {
|
||||
switch (methodId) {
|
||||
case METHODID_METHOD:
|
||||
serviceImpl.method((io.grpc.reflection.testing.Request) request,
|
||||
(io.grpc.stub.StreamObserver<io.grpc.reflection.testing.Reply>) responseObserver);
|
||||
break;
|
||||
default:
|
||||
throw new AssertionError();
|
||||
}
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
@java.lang.SuppressWarnings("unchecked")
|
||||
public io.grpc.stub.StreamObserver<Req> invoke(
|
||||
io.grpc.stub.StreamObserver<Resp> responseObserver) {
|
||||
switch (methodId) {
|
||||
default:
|
||||
throw new AssertionError();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static final class DynamicServiceDescriptorSupplier implements io.grpc.protobuf.ProtoFileDescriptorSupplier {
|
||||
@java.lang.Override
|
||||
public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
|
||||
return io.grpc.reflection.testing.ReflectionTestProto.getDescriptor();
|
||||
}
|
||||
}
|
||||
|
||||
private static io.grpc.ServiceDescriptor serviceDescriptor;
|
||||
|
||||
public static synchronized io.grpc.ServiceDescriptor getServiceDescriptor() {
|
||||
if (serviceDescriptor == null) {
|
||||
serviceDescriptor = new io.grpc.ServiceDescriptor(SERVICE_NAME,
|
||||
new DynamicServiceDescriptorSupplier(),
|
||||
METHOD_METHOD);
|
||||
}
|
||||
|
||||
return serviceDescriptor;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,224 @@
|
|||
package io.grpc.reflection.testing;
|
||||
|
||||
import static io.grpc.stub.ClientCalls.asyncUnaryCall;
|
||||
import static io.grpc.stub.ClientCalls.asyncServerStreamingCall;
|
||||
import static io.grpc.stub.ClientCalls.asyncClientStreamingCall;
|
||||
import static io.grpc.stub.ClientCalls.asyncBidiStreamingCall;
|
||||
import static io.grpc.stub.ClientCalls.blockingUnaryCall;
|
||||
import static io.grpc.stub.ClientCalls.blockingServerStreamingCall;
|
||||
import static io.grpc.stub.ClientCalls.futureUnaryCall;
|
||||
import static io.grpc.MethodDescriptor.generateFullMethodName;
|
||||
import static io.grpc.stub.ServerCalls.asyncUnaryCall;
|
||||
import static io.grpc.stub.ServerCalls.asyncServerStreamingCall;
|
||||
import static io.grpc.stub.ServerCalls.asyncClientStreamingCall;
|
||||
import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall;
|
||||
import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall;
|
||||
import static io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall;
|
||||
|
||||
/**
|
||||
*/
|
||||
@javax.annotation.Generated(
|
||||
value = "by gRPC proto compiler (version 1.1.0-SNAPSHOT)",
|
||||
comments = "Source: io/grpc/reflection/testing/reflection_test.proto")
|
||||
public class ReflectableServiceGrpc {
|
||||
|
||||
private ReflectableServiceGrpc() {}
|
||||
|
||||
public static final String SERVICE_NAME = "grpc.reflection.testing.ReflectableService";
|
||||
|
||||
// Static method descriptors that strictly reflect the proto.
|
||||
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
|
||||
public static final io.grpc.MethodDescriptor<io.grpc.reflection.testing.Request,
|
||||
io.grpc.reflection.testing.Reply> METHOD_METHOD =
|
||||
io.grpc.MethodDescriptor.create(
|
||||
io.grpc.MethodDescriptor.MethodType.UNARY,
|
||||
generateFullMethodName(
|
||||
"grpc.reflection.testing.ReflectableService", "Method"),
|
||||
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.reflection.testing.Request.getDefaultInstance()),
|
||||
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.reflection.testing.Reply.getDefaultInstance()));
|
||||
|
||||
/**
|
||||
* Creates a new async stub that supports all call types for the service
|
||||
*/
|
||||
public static ReflectableServiceStub newStub(io.grpc.Channel channel) {
|
||||
return new ReflectableServiceStub(channel);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
|
||||
*/
|
||||
public static ReflectableServiceBlockingStub newBlockingStub(
|
||||
io.grpc.Channel channel) {
|
||||
return new ReflectableServiceBlockingStub(channel);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new ListenableFuture-style stub that supports unary and streaming output calls on the service
|
||||
*/
|
||||
public static ReflectableServiceFutureStub newFutureStub(
|
||||
io.grpc.Channel channel) {
|
||||
return new ReflectableServiceFutureStub(channel);
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
public static abstract class ReflectableServiceImplBase implements io.grpc.BindableService {
|
||||
|
||||
/**
|
||||
*/
|
||||
public void method(io.grpc.reflection.testing.Request request,
|
||||
io.grpc.stub.StreamObserver<io.grpc.reflection.testing.Reply> responseObserver) {
|
||||
asyncUnimplementedUnaryCall(METHOD_METHOD, responseObserver);
|
||||
}
|
||||
|
||||
@java.lang.Override public io.grpc.ServerServiceDefinition bindService() {
|
||||
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
|
||||
.addMethod(
|
||||
METHOD_METHOD,
|
||||
asyncUnaryCall(
|
||||
new MethodHandlers<
|
||||
io.grpc.reflection.testing.Request,
|
||||
io.grpc.reflection.testing.Reply>(
|
||||
this, METHODID_METHOD)))
|
||||
.build();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
public static final class ReflectableServiceStub extends io.grpc.stub.AbstractStub<ReflectableServiceStub> {
|
||||
private ReflectableServiceStub(io.grpc.Channel channel) {
|
||||
super(channel);
|
||||
}
|
||||
|
||||
private ReflectableServiceStub(io.grpc.Channel channel,
|
||||
io.grpc.CallOptions callOptions) {
|
||||
super(channel, callOptions);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
protected ReflectableServiceStub build(io.grpc.Channel channel,
|
||||
io.grpc.CallOptions callOptions) {
|
||||
return new ReflectableServiceStub(channel, callOptions);
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
public void method(io.grpc.reflection.testing.Request request,
|
||||
io.grpc.stub.StreamObserver<io.grpc.reflection.testing.Reply> responseObserver) {
|
||||
asyncUnaryCall(
|
||||
getChannel().newCall(METHOD_METHOD, getCallOptions()), request, responseObserver);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
public static final class ReflectableServiceBlockingStub extends io.grpc.stub.AbstractStub<ReflectableServiceBlockingStub> {
|
||||
private ReflectableServiceBlockingStub(io.grpc.Channel channel) {
|
||||
super(channel);
|
||||
}
|
||||
|
||||
private ReflectableServiceBlockingStub(io.grpc.Channel channel,
|
||||
io.grpc.CallOptions callOptions) {
|
||||
super(channel, callOptions);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
protected ReflectableServiceBlockingStub build(io.grpc.Channel channel,
|
||||
io.grpc.CallOptions callOptions) {
|
||||
return new ReflectableServiceBlockingStub(channel, callOptions);
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
public io.grpc.reflection.testing.Reply method(io.grpc.reflection.testing.Request request) {
|
||||
return blockingUnaryCall(
|
||||
getChannel(), METHOD_METHOD, getCallOptions(), request);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
public static final class ReflectableServiceFutureStub extends io.grpc.stub.AbstractStub<ReflectableServiceFutureStub> {
|
||||
private ReflectableServiceFutureStub(io.grpc.Channel channel) {
|
||||
super(channel);
|
||||
}
|
||||
|
||||
private ReflectableServiceFutureStub(io.grpc.Channel channel,
|
||||
io.grpc.CallOptions callOptions) {
|
||||
super(channel, callOptions);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
protected ReflectableServiceFutureStub build(io.grpc.Channel channel,
|
||||
io.grpc.CallOptions callOptions) {
|
||||
return new ReflectableServiceFutureStub(channel, callOptions);
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
public com.google.common.util.concurrent.ListenableFuture<io.grpc.reflection.testing.Reply> method(
|
||||
io.grpc.reflection.testing.Request request) {
|
||||
return futureUnaryCall(
|
||||
getChannel().newCall(METHOD_METHOD, getCallOptions()), request);
|
||||
}
|
||||
}
|
||||
|
||||
private static final int METHODID_METHOD = 0;
|
||||
|
||||
private static class MethodHandlers<Req, Resp> implements
|
||||
io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>,
|
||||
io.grpc.stub.ServerCalls.ServerStreamingMethod<Req, Resp>,
|
||||
io.grpc.stub.ServerCalls.ClientStreamingMethod<Req, Resp>,
|
||||
io.grpc.stub.ServerCalls.BidiStreamingMethod<Req, Resp> {
|
||||
private final ReflectableServiceImplBase serviceImpl;
|
||||
private final int methodId;
|
||||
|
||||
public MethodHandlers(ReflectableServiceImplBase serviceImpl, int methodId) {
|
||||
this.serviceImpl = serviceImpl;
|
||||
this.methodId = methodId;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
@java.lang.SuppressWarnings("unchecked")
|
||||
public void invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserver) {
|
||||
switch (methodId) {
|
||||
case METHODID_METHOD:
|
||||
serviceImpl.method((io.grpc.reflection.testing.Request) request,
|
||||
(io.grpc.stub.StreamObserver<io.grpc.reflection.testing.Reply>) responseObserver);
|
||||
break;
|
||||
default:
|
||||
throw new AssertionError();
|
||||
}
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
@java.lang.SuppressWarnings("unchecked")
|
||||
public io.grpc.stub.StreamObserver<Req> invoke(
|
||||
io.grpc.stub.StreamObserver<Resp> responseObserver) {
|
||||
switch (methodId) {
|
||||
default:
|
||||
throw new AssertionError();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static final class ReflectableServiceDescriptorSupplier implements io.grpc.protobuf.ProtoFileDescriptorSupplier {
|
||||
@java.lang.Override
|
||||
public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
|
||||
return io.grpc.reflection.testing.ReflectionTestProto.getDescriptor();
|
||||
}
|
||||
}
|
||||
|
||||
private static io.grpc.ServiceDescriptor serviceDescriptor;
|
||||
|
||||
public static synchronized io.grpc.ServiceDescriptor getServiceDescriptor() {
|
||||
if (serviceDescriptor == null) {
|
||||
serviceDescriptor = new io.grpc.ServiceDescriptor(SERVICE_NAME,
|
||||
new ReflectableServiceDescriptorSupplier(),
|
||||
METHOD_METHOD);
|
||||
}
|
||||
|
||||
return serviceDescriptor;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,374 @@
|
|||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: io/grpc/reflection/testing/reflection_test_depth_three.proto
|
||||
|
||||
package io.grpc.reflection.testing;
|
||||
|
||||
/**
|
||||
* Protobuf type {@code grpc.reflection.testing.EmptyMessage}
|
||||
*/
|
||||
public final class EmptyMessage extends
|
||||
com.google.protobuf.GeneratedMessageV3 implements
|
||||
// @@protoc_insertion_point(message_implements:grpc.reflection.testing.EmptyMessage)
|
||||
EmptyMessageOrBuilder {
|
||||
// Use EmptyMessage.newBuilder() to construct.
|
||||
private EmptyMessage(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
|
||||
super(builder);
|
||||
}
|
||||
private EmptyMessage() {
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public final com.google.protobuf.UnknownFieldSet
|
||||
getUnknownFields() {
|
||||
return this.unknownFields;
|
||||
}
|
||||
private EmptyMessage(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
this();
|
||||
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
|
||||
com.google.protobuf.UnknownFieldSet.newBuilder();
|
||||
try {
|
||||
boolean done = false;
|
||||
while (!done) {
|
||||
int tag = input.readTag();
|
||||
switch (tag) {
|
||||
case 0:
|
||||
done = true;
|
||||
break;
|
||||
default: {
|
||||
if (!parseUnknownField(input, unknownFields,
|
||||
extensionRegistry, tag)) {
|
||||
done = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||
throw e.setUnfinishedMessage(this);
|
||||
} catch (java.io.IOException e) {
|
||||
throw new com.google.protobuf.InvalidProtocolBufferException(
|
||||
e).setUnfinishedMessage(this);
|
||||
} finally {
|
||||
this.unknownFields = unknownFields.build();
|
||||
makeExtensionsImmutable();
|
||||
}
|
||||
}
|
||||
public static final com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptor() {
|
||||
return io.grpc.reflection.testing.ReflectionTestDepthThreeProto.internal_static_grpc_reflection_testing_EmptyMessage_descriptor;
|
||||
}
|
||||
|
||||
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internalGetFieldAccessorTable() {
|
||||
return io.grpc.reflection.testing.ReflectionTestDepthThreeProto.internal_static_grpc_reflection_testing_EmptyMessage_fieldAccessorTable
|
||||
.ensureFieldAccessorsInitialized(
|
||||
io.grpc.reflection.testing.EmptyMessage.class, io.grpc.reflection.testing.EmptyMessage.Builder.class);
|
||||
}
|
||||
|
||||
private byte memoizedIsInitialized = -1;
|
||||
public final boolean isInitialized() {
|
||||
byte isInitialized = memoizedIsInitialized;
|
||||
if (isInitialized == 1) return true;
|
||||
if (isInitialized == 0) return false;
|
||||
|
||||
memoizedIsInitialized = 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
public void writeTo(com.google.protobuf.CodedOutputStream output)
|
||||
throws java.io.IOException {
|
||||
unknownFields.writeTo(output);
|
||||
}
|
||||
|
||||
public int getSerializedSize() {
|
||||
int size = memoizedSize;
|
||||
if (size != -1) return size;
|
||||
|
||||
size = 0;
|
||||
size += unknownFields.getSerializedSize();
|
||||
memoizedSize = size;
|
||||
return size;
|
||||
}
|
||||
|
||||
private static final long serialVersionUID = 0L;
|
||||
@java.lang.Override
|
||||
public boolean equals(final java.lang.Object obj) {
|
||||
if (obj == this) {
|
||||
return true;
|
||||
}
|
||||
if (!(obj instanceof io.grpc.reflection.testing.EmptyMessage)) {
|
||||
return super.equals(obj);
|
||||
}
|
||||
io.grpc.reflection.testing.EmptyMessage other = (io.grpc.reflection.testing.EmptyMessage) obj;
|
||||
|
||||
boolean result = true;
|
||||
result = result && unknownFields.equals(other.unknownFields);
|
||||
return result;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public int hashCode() {
|
||||
if (memoizedHashCode != 0) {
|
||||
return memoizedHashCode;
|
||||
}
|
||||
int hash = 41;
|
||||
hash = (19 * hash) + getDescriptorForType().hashCode();
|
||||
hash = (29 * hash) + unknownFields.hashCode();
|
||||
memoizedHashCode = hash;
|
||||
return hash;
|
||||
}
|
||||
|
||||
public static io.grpc.reflection.testing.EmptyMessage parseFrom(
|
||||
com.google.protobuf.ByteString data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static io.grpc.reflection.testing.EmptyMessage parseFrom(
|
||||
com.google.protobuf.ByteString data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
public static io.grpc.reflection.testing.EmptyMessage parseFrom(byte[] data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static io.grpc.reflection.testing.EmptyMessage parseFrom(
|
||||
byte[] data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
public static io.grpc.reflection.testing.EmptyMessage parseFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input);
|
||||
}
|
||||
public static io.grpc.reflection.testing.EmptyMessage parseFrom(
|
||||
java.io.InputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
public static io.grpc.reflection.testing.EmptyMessage parseDelimitedFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseDelimitedWithIOException(PARSER, input);
|
||||
}
|
||||
public static io.grpc.reflection.testing.EmptyMessage parseDelimitedFrom(
|
||||
java.io.InputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
public static io.grpc.reflection.testing.EmptyMessage parseFrom(
|
||||
com.google.protobuf.CodedInputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input);
|
||||
}
|
||||
public static io.grpc.reflection.testing.EmptyMessage parseFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
|
||||
public Builder newBuilderForType() { return newBuilder(); }
|
||||
public static Builder newBuilder() {
|
||||
return DEFAULT_INSTANCE.toBuilder();
|
||||
}
|
||||
public static Builder newBuilder(io.grpc.reflection.testing.EmptyMessage prototype) {
|
||||
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
|
||||
}
|
||||
public Builder toBuilder() {
|
||||
return this == DEFAULT_INSTANCE
|
||||
? new Builder() : new Builder().mergeFrom(this);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
protected Builder newBuilderForType(
|
||||
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
|
||||
Builder builder = new Builder(parent);
|
||||
return builder;
|
||||
}
|
||||
/**
|
||||
* Protobuf type {@code grpc.reflection.testing.EmptyMessage}
|
||||
*/
|
||||
public static final class Builder extends
|
||||
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
|
||||
// @@protoc_insertion_point(builder_implements:grpc.reflection.testing.EmptyMessage)
|
||||
io.grpc.reflection.testing.EmptyMessageOrBuilder {
|
||||
public static final com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptor() {
|
||||
return io.grpc.reflection.testing.ReflectionTestDepthThreeProto.internal_static_grpc_reflection_testing_EmptyMessage_descriptor;
|
||||
}
|
||||
|
||||
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internalGetFieldAccessorTable() {
|
||||
return io.grpc.reflection.testing.ReflectionTestDepthThreeProto.internal_static_grpc_reflection_testing_EmptyMessage_fieldAccessorTable
|
||||
.ensureFieldAccessorsInitialized(
|
||||
io.grpc.reflection.testing.EmptyMessage.class, io.grpc.reflection.testing.EmptyMessage.Builder.class);
|
||||
}
|
||||
|
||||
// Construct using io.grpc.reflection.testing.EmptyMessage.newBuilder()
|
||||
private Builder() {
|
||||
maybeForceBuilderInitialization();
|
||||
}
|
||||
|
||||
private Builder(
|
||||
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
|
||||
super(parent);
|
||||
maybeForceBuilderInitialization();
|
||||
}
|
||||
private void maybeForceBuilderInitialization() {
|
||||
if (com.google.protobuf.GeneratedMessageV3
|
||||
.alwaysUseFieldBuilders) {
|
||||
}
|
||||
}
|
||||
public Builder clear() {
|
||||
super.clear();
|
||||
return this;
|
||||
}
|
||||
|
||||
public com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptorForType() {
|
||||
return io.grpc.reflection.testing.ReflectionTestDepthThreeProto.internal_static_grpc_reflection_testing_EmptyMessage_descriptor;
|
||||
}
|
||||
|
||||
public io.grpc.reflection.testing.EmptyMessage getDefaultInstanceForType() {
|
||||
return io.grpc.reflection.testing.EmptyMessage.getDefaultInstance();
|
||||
}
|
||||
|
||||
public io.grpc.reflection.testing.EmptyMessage build() {
|
||||
io.grpc.reflection.testing.EmptyMessage result = buildPartial();
|
||||
if (!result.isInitialized()) {
|
||||
throw newUninitializedMessageException(result);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public io.grpc.reflection.testing.EmptyMessage buildPartial() {
|
||||
io.grpc.reflection.testing.EmptyMessage result = new io.grpc.reflection.testing.EmptyMessage(this);
|
||||
onBuilt();
|
||||
return result;
|
||||
}
|
||||
|
||||
public Builder clone() {
|
||||
return (Builder) super.clone();
|
||||
}
|
||||
public Builder setField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||
Object value) {
|
||||
return (Builder) super.setField(field, value);
|
||||
}
|
||||
public Builder clearField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field) {
|
||||
return (Builder) super.clearField(field);
|
||||
}
|
||||
public Builder clearOneof(
|
||||
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
|
||||
return (Builder) super.clearOneof(oneof);
|
||||
}
|
||||
public Builder setRepeatedField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||
int index, Object value) {
|
||||
return (Builder) super.setRepeatedField(field, index, value);
|
||||
}
|
||||
public Builder addRepeatedField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||
Object value) {
|
||||
return (Builder) super.addRepeatedField(field, value);
|
||||
}
|
||||
public Builder mergeFrom(com.google.protobuf.Message other) {
|
||||
if (other instanceof io.grpc.reflection.testing.EmptyMessage) {
|
||||
return mergeFrom((io.grpc.reflection.testing.EmptyMessage)other);
|
||||
} else {
|
||||
super.mergeFrom(other);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
public Builder mergeFrom(io.grpc.reflection.testing.EmptyMessage other) {
|
||||
if (other == io.grpc.reflection.testing.EmptyMessage.getDefaultInstance()) return this;
|
||||
this.mergeUnknownFields(other.unknownFields);
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
|
||||
public final boolean isInitialized() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public Builder mergeFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
io.grpc.reflection.testing.EmptyMessage parsedMessage = null;
|
||||
try {
|
||||
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
|
||||
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||
parsedMessage = (io.grpc.reflection.testing.EmptyMessage) e.getUnfinishedMessage();
|
||||
throw e.unwrapIOException();
|
||||
} finally {
|
||||
if (parsedMessage != null) {
|
||||
mergeFrom(parsedMessage);
|
||||
}
|
||||
}
|
||||
return this;
|
||||
}
|
||||
public final Builder setUnknownFields(
|
||||
final com.google.protobuf.UnknownFieldSet unknownFields) {
|
||||
return super.setUnknownFields(unknownFields);
|
||||
}
|
||||
|
||||
public final Builder mergeUnknownFields(
|
||||
final com.google.protobuf.UnknownFieldSet unknownFields) {
|
||||
return super.mergeUnknownFields(unknownFields);
|
||||
}
|
||||
|
||||
|
||||
// @@protoc_insertion_point(builder_scope:grpc.reflection.testing.EmptyMessage)
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:grpc.reflection.testing.EmptyMessage)
|
||||
private static final io.grpc.reflection.testing.EmptyMessage DEFAULT_INSTANCE;
|
||||
static {
|
||||
DEFAULT_INSTANCE = new io.grpc.reflection.testing.EmptyMessage();
|
||||
}
|
||||
|
||||
public static io.grpc.reflection.testing.EmptyMessage getDefaultInstance() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
@java.lang.Deprecated public static final com.google.protobuf.Parser<EmptyMessage>
|
||||
PARSER = new com.google.protobuf.AbstractParser<EmptyMessage>() {
|
||||
public EmptyMessage parsePartialFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return new EmptyMessage(input, extensionRegistry);
|
||||
}
|
||||
};
|
||||
|
||||
public static com.google.protobuf.Parser<EmptyMessage> parser() {
|
||||
return PARSER;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public com.google.protobuf.Parser<EmptyMessage> getParserForType() {
|
||||
return PARSER;
|
||||
}
|
||||
|
||||
public io.grpc.reflection.testing.EmptyMessage getDefaultInstanceForType() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: io/grpc/reflection/testing/reflection_test_depth_three.proto
|
||||
|
||||
package io.grpc.reflection.testing;
|
||||
|
||||
public interface EmptyMessageOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:grpc.reflection.testing.EmptyMessage)
|
||||
com.google.protobuf.MessageOrBuilder {
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,9 @@
|
|||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: io/grpc/reflection/testing/reflection_test_depth_three.proto
|
||||
|
||||
package io.grpc.reflection.testing;
|
||||
|
||||
public interface NestedTypeOuterOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:grpc.reflection.testing.NestedTypeOuter)
|
||||
com.google.protobuf.MessageOrBuilder {
|
||||
}
|
||||
|
|
@ -0,0 +1,104 @@
|
|||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: io/grpc/reflection/testing/reflection_test_depth_three.proto
|
||||
|
||||
package io.grpc.reflection.testing;
|
||||
|
||||
public final class ReflectionTestDepthThreeProto {
|
||||
private ReflectionTestDepthThreeProto() {}
|
||||
public static void registerAllExtensions(
|
||||
com.google.protobuf.ExtensionRegistryLite registry) {
|
||||
}
|
||||
|
||||
public static void registerAllExtensions(
|
||||
com.google.protobuf.ExtensionRegistry registry) {
|
||||
registerAllExtensions(
|
||||
(com.google.protobuf.ExtensionRegistryLite) registry);
|
||||
}
|
||||
static final com.google.protobuf.Descriptors.Descriptor
|
||||
internal_static_grpc_reflection_testing_EmptyMessage_descriptor;
|
||||
static final
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internal_static_grpc_reflection_testing_EmptyMessage_fieldAccessorTable;
|
||||
static final com.google.protobuf.Descriptors.Descriptor
|
||||
internal_static_grpc_reflection_testing_ThirdLevelType_descriptor;
|
||||
static final
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internal_static_grpc_reflection_testing_ThirdLevelType_fieldAccessorTable;
|
||||
static final com.google.protobuf.Descriptors.Descriptor
|
||||
internal_static_grpc_reflection_testing_NestedTypeOuter_descriptor;
|
||||
static final
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internal_static_grpc_reflection_testing_NestedTypeOuter_fieldAccessorTable;
|
||||
static final com.google.protobuf.Descriptors.Descriptor
|
||||
internal_static_grpc_reflection_testing_NestedTypeOuter_Middle_descriptor;
|
||||
static final
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internal_static_grpc_reflection_testing_NestedTypeOuter_Middle_fieldAccessorTable;
|
||||
static final com.google.protobuf.Descriptors.Descriptor
|
||||
internal_static_grpc_reflection_testing_NestedTypeOuter_Middle_Inner_descriptor;
|
||||
static final
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internal_static_grpc_reflection_testing_NestedTypeOuter_Middle_Inner_fieldAccessorTable;
|
||||
|
||||
public static com.google.protobuf.Descriptors.FileDescriptor
|
||||
getDescriptor() {
|
||||
return descriptor;
|
||||
}
|
||||
private static com.google.protobuf.Descriptors.FileDescriptor
|
||||
descriptor;
|
||||
static {
|
||||
java.lang.String[] descriptorData = {
|
||||
"\n<io/grpc/reflection/testing/reflection_" +
|
||||
"test_depth_three.proto\022\027grpc.reflection." +
|
||||
"testing\"\016\n\014EmptyMessage\"(\n\016ThirdLevelTyp" +
|
||||
"e\022\017\n\007message\030\001 \002(\t*\005\010d\020\310\001\"2\n\017NestedTypeO" +
|
||||
"uter\032\037\n\006Middle\032\025\n\005Inner\022\014\n\004ival\030\001 \002(\005B=\n" +
|
||||
"\032io.grpc.reflection.testingB\035ReflectionT" +
|
||||
"estDepthThreeProtoP\001"
|
||||
};
|
||||
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
|
||||
new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() {
|
||||
public com.google.protobuf.ExtensionRegistry assignDescriptors(
|
||||
com.google.protobuf.Descriptors.FileDescriptor root) {
|
||||
descriptor = root;
|
||||
return null;
|
||||
}
|
||||
};
|
||||
com.google.protobuf.Descriptors.FileDescriptor
|
||||
.internalBuildGeneratedFileFrom(descriptorData,
|
||||
new com.google.protobuf.Descriptors.FileDescriptor[] {
|
||||
}, assigner);
|
||||
internal_static_grpc_reflection_testing_EmptyMessage_descriptor =
|
||||
getDescriptor().getMessageTypes().get(0);
|
||||
internal_static_grpc_reflection_testing_EmptyMessage_fieldAccessorTable = new
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
|
||||
internal_static_grpc_reflection_testing_EmptyMessage_descriptor,
|
||||
new java.lang.String[] { });
|
||||
internal_static_grpc_reflection_testing_ThirdLevelType_descriptor =
|
||||
getDescriptor().getMessageTypes().get(1);
|
||||
internal_static_grpc_reflection_testing_ThirdLevelType_fieldAccessorTable = new
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
|
||||
internal_static_grpc_reflection_testing_ThirdLevelType_descriptor,
|
||||
new java.lang.String[] { "Message", });
|
||||
internal_static_grpc_reflection_testing_NestedTypeOuter_descriptor =
|
||||
getDescriptor().getMessageTypes().get(2);
|
||||
internal_static_grpc_reflection_testing_NestedTypeOuter_fieldAccessorTable = new
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
|
||||
internal_static_grpc_reflection_testing_NestedTypeOuter_descriptor,
|
||||
new java.lang.String[] { });
|
||||
internal_static_grpc_reflection_testing_NestedTypeOuter_Middle_descriptor =
|
||||
internal_static_grpc_reflection_testing_NestedTypeOuter_descriptor.getNestedTypes().get(0);
|
||||
internal_static_grpc_reflection_testing_NestedTypeOuter_Middle_fieldAccessorTable = new
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
|
||||
internal_static_grpc_reflection_testing_NestedTypeOuter_Middle_descriptor,
|
||||
new java.lang.String[] { });
|
||||
internal_static_grpc_reflection_testing_NestedTypeOuter_Middle_Inner_descriptor =
|
||||
internal_static_grpc_reflection_testing_NestedTypeOuter_Middle_descriptor.getNestedTypes().get(0);
|
||||
internal_static_grpc_reflection_testing_NestedTypeOuter_Middle_Inner_fieldAccessorTable = new
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
|
||||
internal_static_grpc_reflection_testing_NestedTypeOuter_Middle_Inner_descriptor,
|
||||
new java.lang.String[] { "Ival", });
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(outer_class_scope)
|
||||
}
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: io/grpc/reflection/testing/reflection_test_depth_two_alternate.proto
|
||||
|
||||
package io.grpc.reflection.testing;
|
||||
|
||||
public final class ReflectionTestDepthTwoAlternateProto {
|
||||
private ReflectionTestDepthTwoAlternateProto() {}
|
||||
public static void registerAllExtensions(
|
||||
com.google.protobuf.ExtensionRegistryLite registry) {
|
||||
}
|
||||
|
||||
public static void registerAllExtensions(
|
||||
com.google.protobuf.ExtensionRegistry registry) {
|
||||
registerAllExtensions(
|
||||
(com.google.protobuf.ExtensionRegistryLite) registry);
|
||||
}
|
||||
|
||||
public static com.google.protobuf.Descriptors.FileDescriptor
|
||||
getDescriptor() {
|
||||
return descriptor;
|
||||
}
|
||||
private static com.google.protobuf.Descriptors.FileDescriptor
|
||||
descriptor;
|
||||
static {
|
||||
java.lang.String[] descriptorData = {
|
||||
"\nDio/grpc/reflection/testing/reflection_" +
|
||||
"test_depth_two_alternate.proto\032<io/grpc/" +
|
||||
"reflection/testing/reflection_test_depth" +
|
||||
"_three.protoBD\n\032io.grpc.reflection.testi" +
|
||||
"ngB$ReflectionTestDepthTwoAlternateProto" +
|
||||
"P\001P\000"
|
||||
};
|
||||
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
|
||||
new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() {
|
||||
public com.google.protobuf.ExtensionRegistry assignDescriptors(
|
||||
com.google.protobuf.Descriptors.FileDescriptor root) {
|
||||
descriptor = root;
|
||||
return null;
|
||||
}
|
||||
};
|
||||
com.google.protobuf.Descriptors.FileDescriptor
|
||||
.internalBuildGeneratedFileFrom(descriptorData,
|
||||
new com.google.protobuf.Descriptors.FileDescriptor[] {
|
||||
io.grpc.reflection.testing.ReflectionTestDepthThreeProto.getDescriptor(),
|
||||
}, assigner);
|
||||
io.grpc.reflection.testing.ReflectionTestDepthThreeProto.getDescriptor();
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(outer_class_scope)
|
||||
}
|
||||
|
|
@ -0,0 +1,89 @@
|
|||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: io/grpc/reflection/testing/reflection_test_depth_two.proto
|
||||
|
||||
package io.grpc.reflection.testing;
|
||||
|
||||
public final class ReflectionTestDepthTwoProto {
|
||||
private ReflectionTestDepthTwoProto() {}
|
||||
public static void registerAllExtensions(
|
||||
com.google.protobuf.ExtensionRegistryLite registry) {
|
||||
registry.add(io.grpc.reflection.testing.ReflectionTestDepthTwoProto.nestedExtension);
|
||||
}
|
||||
|
||||
public static void registerAllExtensions(
|
||||
com.google.protobuf.ExtensionRegistry registry) {
|
||||
registerAllExtensions(
|
||||
(com.google.protobuf.ExtensionRegistryLite) registry);
|
||||
}
|
||||
public static final int NESTED_EXTENSION_FIELD_NUMBER = 101;
|
||||
/**
|
||||
* <code>extend .grpc.reflection.testing.ThirdLevelType { ... }</code>
|
||||
*/
|
||||
public static final
|
||||
com.google.protobuf.GeneratedMessage.GeneratedExtension<
|
||||
io.grpc.reflection.testing.ThirdLevelType,
|
||||
io.grpc.reflection.testing.EmptyMessage> nestedExtension = com.google.protobuf.GeneratedMessage
|
||||
.newFileScopedGeneratedExtension(
|
||||
io.grpc.reflection.testing.EmptyMessage.class,
|
||||
io.grpc.reflection.testing.EmptyMessage.getDefaultInstance());
|
||||
static final com.google.protobuf.Descriptors.Descriptor
|
||||
internal_static_grpc_reflection_testing_Request_descriptor;
|
||||
static final
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internal_static_grpc_reflection_testing_Request_fieldAccessorTable;
|
||||
static final com.google.protobuf.Descriptors.Descriptor
|
||||
internal_static_grpc_reflection_testing_Reply_descriptor;
|
||||
static final
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internal_static_grpc_reflection_testing_Reply_fieldAccessorTable;
|
||||
|
||||
public static com.google.protobuf.Descriptors.FileDescriptor
|
||||
getDescriptor() {
|
||||
return descriptor;
|
||||
}
|
||||
private static com.google.protobuf.Descriptors.FileDescriptor
|
||||
descriptor;
|
||||
static {
|
||||
java.lang.String[] descriptorData = {
|
||||
"\n:io/grpc/reflection/testing/reflection_" +
|
||||
"test_depth_two.proto\022\027grpc.reflection.te" +
|
||||
"sting\032<io/grpc/reflection/testing/reflec" +
|
||||
"tion_test_depth_three.proto\"\032\n\007Request\022\017" +
|
||||
"\n\007message\030\001 \002(\t\"\030\n\005Reply\022\017\n\007message\030\001 \002(" +
|
||||
"\t:h\n\020nested_extension\022\'.grpc.reflection." +
|
||||
"testing.ThirdLevelType\030e \001(\0132%.grpc.refl" +
|
||||
"ection.testing.EmptyMessageB;\n\032io.grpc.r" +
|
||||
"eflection.testingB\033ReflectionTestDepthTw" +
|
||||
"oProtoP\001P\000"
|
||||
};
|
||||
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
|
||||
new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() {
|
||||
public com.google.protobuf.ExtensionRegistry assignDescriptors(
|
||||
com.google.protobuf.Descriptors.FileDescriptor root) {
|
||||
descriptor = root;
|
||||
return null;
|
||||
}
|
||||
};
|
||||
com.google.protobuf.Descriptors.FileDescriptor
|
||||
.internalBuildGeneratedFileFrom(descriptorData,
|
||||
new com.google.protobuf.Descriptors.FileDescriptor[] {
|
||||
io.grpc.reflection.testing.ReflectionTestDepthThreeProto.getDescriptor(),
|
||||
}, assigner);
|
||||
internal_static_grpc_reflection_testing_Request_descriptor =
|
||||
getDescriptor().getMessageTypes().get(0);
|
||||
internal_static_grpc_reflection_testing_Request_fieldAccessorTable = new
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
|
||||
internal_static_grpc_reflection_testing_Request_descriptor,
|
||||
new java.lang.String[] { "Message", });
|
||||
internal_static_grpc_reflection_testing_Reply_descriptor =
|
||||
getDescriptor().getMessageTypes().get(1);
|
||||
internal_static_grpc_reflection_testing_Reply_fieldAccessorTable = new
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
|
||||
internal_static_grpc_reflection_testing_Reply_descriptor,
|
||||
new java.lang.String[] { "Message", });
|
||||
nestedExtension.internalInit(descriptor.getExtensions().get(0));
|
||||
io.grpc.reflection.testing.ReflectionTestDepthThreeProto.getDescriptor();
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(outer_class_scope)
|
||||
}
|
||||
|
|
@ -0,0 +1,72 @@
|
|||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: io/grpc/reflection/testing/reflection_test.proto
|
||||
|
||||
package io.grpc.reflection.testing;
|
||||
|
||||
public final class ReflectionTestProto {
|
||||
private ReflectionTestProto() {}
|
||||
public static void registerAllExtensions(
|
||||
com.google.protobuf.ExtensionRegistryLite registry) {
|
||||
registry.add(io.grpc.reflection.testing.ReflectionTestProto.bar);
|
||||
}
|
||||
|
||||
public static void registerAllExtensions(
|
||||
com.google.protobuf.ExtensionRegistry registry) {
|
||||
registerAllExtensions(
|
||||
(com.google.protobuf.ExtensionRegistryLite) registry);
|
||||
}
|
||||
public static final int BAR_FIELD_NUMBER = 100;
|
||||
/**
|
||||
* <code>extend .grpc.reflection.testing.ThirdLevelType { ... }</code>
|
||||
*/
|
||||
public static final
|
||||
com.google.protobuf.GeneratedMessage.GeneratedExtension<
|
||||
io.grpc.reflection.testing.ThirdLevelType,
|
||||
java.lang.Integer> bar = com.google.protobuf.GeneratedMessage
|
||||
.newFileScopedGeneratedExtension(
|
||||
java.lang.Integer.class,
|
||||
null);
|
||||
|
||||
public static com.google.protobuf.Descriptors.FileDescriptor
|
||||
getDescriptor() {
|
||||
return descriptor;
|
||||
}
|
||||
private static com.google.protobuf.Descriptors.FileDescriptor
|
||||
descriptor;
|
||||
static {
|
||||
java.lang.String[] descriptorData = {
|
||||
"\n0io/grpc/reflection/testing/reflection_" +
|
||||
"test.proto\022\027grpc.reflection.testing\032:io/" +
|
||||
"grpc/reflection/testing/reflection_test_" +
|
||||
"depth_two.proto\032Dio/grpc/reflection/test" +
|
||||
"ing/reflection_test_depth_two_alternate." +
|
||||
"proto2b\n\022ReflectableService\022L\n\006Method\022 ." +
|
||||
"grpc.reflection.testing.Request\032\036.grpc.r" +
|
||||
"eflection.testing.Reply\"\0002^\n\016DynamicServ" +
|
||||
"ice\022L\n\006Method\022 .grpc.reflection.testing." +
|
||||
"Request\032\036.grpc.reflection.testing.Reply\"",
|
||||
"\000:4\n\003bar\022\'.grpc.reflection.testing.Third" +
|
||||
"LevelType\030d \001(\005B3\n\032io.grpc.reflection.te" +
|
||||
"stingB\023ReflectionTestProtoP\001"
|
||||
};
|
||||
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
|
||||
new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() {
|
||||
public com.google.protobuf.ExtensionRegistry assignDescriptors(
|
||||
com.google.protobuf.Descriptors.FileDescriptor root) {
|
||||
descriptor = root;
|
||||
return null;
|
||||
}
|
||||
};
|
||||
com.google.protobuf.Descriptors.FileDescriptor
|
||||
.internalBuildGeneratedFileFrom(descriptorData,
|
||||
new com.google.protobuf.Descriptors.FileDescriptor[] {
|
||||
io.grpc.reflection.testing.ReflectionTestDepthTwoProto.getDescriptor(),
|
||||
io.grpc.reflection.testing.ReflectionTestDepthTwoAlternateProto.getDescriptor(),
|
||||
}, assigner);
|
||||
bar.internalInit(descriptor.getExtensions().get(0));
|
||||
io.grpc.reflection.testing.ReflectionTestDepthTwoProto.getDescriptor();
|
||||
io.grpc.reflection.testing.ReflectionTestDepthTwoAlternateProto.getDescriptor();
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(outer_class_scope)
|
||||
}
|
||||
|
|
@ -0,0 +1,538 @@
|
|||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: io/grpc/reflection/testing/reflection_test_depth_two.proto
|
||||
|
||||
package io.grpc.reflection.testing;
|
||||
|
||||
/**
|
||||
* Protobuf type {@code grpc.reflection.testing.Reply}
|
||||
*/
|
||||
public final class Reply extends
|
||||
com.google.protobuf.GeneratedMessageV3 implements
|
||||
// @@protoc_insertion_point(message_implements:grpc.reflection.testing.Reply)
|
||||
ReplyOrBuilder {
|
||||
// Use Reply.newBuilder() to construct.
|
||||
private Reply(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
|
||||
super(builder);
|
||||
}
|
||||
private Reply() {
|
||||
message_ = "";
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public final com.google.protobuf.UnknownFieldSet
|
||||
getUnknownFields() {
|
||||
return this.unknownFields;
|
||||
}
|
||||
private Reply(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
this();
|
||||
int mutable_bitField0_ = 0;
|
||||
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
|
||||
com.google.protobuf.UnknownFieldSet.newBuilder();
|
||||
try {
|
||||
boolean done = false;
|
||||
while (!done) {
|
||||
int tag = input.readTag();
|
||||
switch (tag) {
|
||||
case 0:
|
||||
done = true;
|
||||
break;
|
||||
default: {
|
||||
if (!parseUnknownField(input, unknownFields,
|
||||
extensionRegistry, tag)) {
|
||||
done = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 10: {
|
||||
com.google.protobuf.ByteString bs = input.readBytes();
|
||||
bitField0_ |= 0x00000001;
|
||||
message_ = bs;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||
throw e.setUnfinishedMessage(this);
|
||||
} catch (java.io.IOException e) {
|
||||
throw new com.google.protobuf.InvalidProtocolBufferException(
|
||||
e).setUnfinishedMessage(this);
|
||||
} finally {
|
||||
this.unknownFields = unknownFields.build();
|
||||
makeExtensionsImmutable();
|
||||
}
|
||||
}
|
||||
public static final com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptor() {
|
||||
return io.grpc.reflection.testing.ReflectionTestDepthTwoProto.internal_static_grpc_reflection_testing_Reply_descriptor;
|
||||
}
|
||||
|
||||
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internalGetFieldAccessorTable() {
|
||||
return io.grpc.reflection.testing.ReflectionTestDepthTwoProto.internal_static_grpc_reflection_testing_Reply_fieldAccessorTable
|
||||
.ensureFieldAccessorsInitialized(
|
||||
io.grpc.reflection.testing.Reply.class, io.grpc.reflection.testing.Reply.Builder.class);
|
||||
}
|
||||
|
||||
private int bitField0_;
|
||||
public static final int MESSAGE_FIELD_NUMBER = 1;
|
||||
private volatile java.lang.Object message_;
|
||||
/**
|
||||
* <code>required string message = 1;</code>
|
||||
*/
|
||||
public boolean hasMessage() {
|
||||
return ((bitField0_ & 0x00000001) == 0x00000001);
|
||||
}
|
||||
/**
|
||||
* <code>required string message = 1;</code>
|
||||
*/
|
||||
public java.lang.String getMessage() {
|
||||
java.lang.Object ref = message_;
|
||||
if (ref instanceof java.lang.String) {
|
||||
return (java.lang.String) ref;
|
||||
} else {
|
||||
com.google.protobuf.ByteString bs =
|
||||
(com.google.protobuf.ByteString) ref;
|
||||
java.lang.String s = bs.toStringUtf8();
|
||||
if (bs.isValidUtf8()) {
|
||||
message_ = s;
|
||||
}
|
||||
return s;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* <code>required string message = 1;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getMessageBytes() {
|
||||
java.lang.Object ref = message_;
|
||||
if (ref instanceof java.lang.String) {
|
||||
com.google.protobuf.ByteString b =
|
||||
com.google.protobuf.ByteString.copyFromUtf8(
|
||||
(java.lang.String) ref);
|
||||
message_ = b;
|
||||
return b;
|
||||
} else {
|
||||
return (com.google.protobuf.ByteString) ref;
|
||||
}
|
||||
}
|
||||
|
||||
private byte memoizedIsInitialized = -1;
|
||||
public final boolean isInitialized() {
|
||||
byte isInitialized = memoizedIsInitialized;
|
||||
if (isInitialized == 1) return true;
|
||||
if (isInitialized == 0) return false;
|
||||
|
||||
if (!hasMessage()) {
|
||||
memoizedIsInitialized = 0;
|
||||
return false;
|
||||
}
|
||||
memoizedIsInitialized = 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
public void writeTo(com.google.protobuf.CodedOutputStream output)
|
||||
throws java.io.IOException {
|
||||
if (((bitField0_ & 0x00000001) == 0x00000001)) {
|
||||
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, message_);
|
||||
}
|
||||
unknownFields.writeTo(output);
|
||||
}
|
||||
|
||||
public int getSerializedSize() {
|
||||
int size = memoizedSize;
|
||||
if (size != -1) return size;
|
||||
|
||||
size = 0;
|
||||
if (((bitField0_ & 0x00000001) == 0x00000001)) {
|
||||
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, message_);
|
||||
}
|
||||
size += unknownFields.getSerializedSize();
|
||||
memoizedSize = size;
|
||||
return size;
|
||||
}
|
||||
|
||||
private static final long serialVersionUID = 0L;
|
||||
@java.lang.Override
|
||||
public boolean equals(final java.lang.Object obj) {
|
||||
if (obj == this) {
|
||||
return true;
|
||||
}
|
||||
if (!(obj instanceof io.grpc.reflection.testing.Reply)) {
|
||||
return super.equals(obj);
|
||||
}
|
||||
io.grpc.reflection.testing.Reply other = (io.grpc.reflection.testing.Reply) obj;
|
||||
|
||||
boolean result = true;
|
||||
result = result && (hasMessage() == other.hasMessage());
|
||||
if (hasMessage()) {
|
||||
result = result && getMessage()
|
||||
.equals(other.getMessage());
|
||||
}
|
||||
result = result && unknownFields.equals(other.unknownFields);
|
||||
return result;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public int hashCode() {
|
||||
if (memoizedHashCode != 0) {
|
||||
return memoizedHashCode;
|
||||
}
|
||||
int hash = 41;
|
||||
hash = (19 * hash) + getDescriptorForType().hashCode();
|
||||
if (hasMessage()) {
|
||||
hash = (37 * hash) + MESSAGE_FIELD_NUMBER;
|
||||
hash = (53 * hash) + getMessage().hashCode();
|
||||
}
|
||||
hash = (29 * hash) + unknownFields.hashCode();
|
||||
memoizedHashCode = hash;
|
||||
return hash;
|
||||
}
|
||||
|
||||
public static io.grpc.reflection.testing.Reply parseFrom(
|
||||
com.google.protobuf.ByteString data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static io.grpc.reflection.testing.Reply parseFrom(
|
||||
com.google.protobuf.ByteString data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
public static io.grpc.reflection.testing.Reply parseFrom(byte[] data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static io.grpc.reflection.testing.Reply parseFrom(
|
||||
byte[] data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
public static io.grpc.reflection.testing.Reply parseFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input);
|
||||
}
|
||||
public static io.grpc.reflection.testing.Reply parseFrom(
|
||||
java.io.InputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
public static io.grpc.reflection.testing.Reply parseDelimitedFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseDelimitedWithIOException(PARSER, input);
|
||||
}
|
||||
public static io.grpc.reflection.testing.Reply parseDelimitedFrom(
|
||||
java.io.InputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
public static io.grpc.reflection.testing.Reply parseFrom(
|
||||
com.google.protobuf.CodedInputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input);
|
||||
}
|
||||
public static io.grpc.reflection.testing.Reply parseFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
|
||||
public Builder newBuilderForType() { return newBuilder(); }
|
||||
public static Builder newBuilder() {
|
||||
return DEFAULT_INSTANCE.toBuilder();
|
||||
}
|
||||
public static Builder newBuilder(io.grpc.reflection.testing.Reply prototype) {
|
||||
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
|
||||
}
|
||||
public Builder toBuilder() {
|
||||
return this == DEFAULT_INSTANCE
|
||||
? new Builder() : new Builder().mergeFrom(this);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
protected Builder newBuilderForType(
|
||||
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
|
||||
Builder builder = new Builder(parent);
|
||||
return builder;
|
||||
}
|
||||
/**
|
||||
* Protobuf type {@code grpc.reflection.testing.Reply}
|
||||
*/
|
||||
public static final class Builder extends
|
||||
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
|
||||
// @@protoc_insertion_point(builder_implements:grpc.reflection.testing.Reply)
|
||||
io.grpc.reflection.testing.ReplyOrBuilder {
|
||||
public static final com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptor() {
|
||||
return io.grpc.reflection.testing.ReflectionTestDepthTwoProto.internal_static_grpc_reflection_testing_Reply_descriptor;
|
||||
}
|
||||
|
||||
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internalGetFieldAccessorTable() {
|
||||
return io.grpc.reflection.testing.ReflectionTestDepthTwoProto.internal_static_grpc_reflection_testing_Reply_fieldAccessorTable
|
||||
.ensureFieldAccessorsInitialized(
|
||||
io.grpc.reflection.testing.Reply.class, io.grpc.reflection.testing.Reply.Builder.class);
|
||||
}
|
||||
|
||||
// Construct using io.grpc.reflection.testing.Reply.newBuilder()
|
||||
private Builder() {
|
||||
maybeForceBuilderInitialization();
|
||||
}
|
||||
|
||||
private Builder(
|
||||
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
|
||||
super(parent);
|
||||
maybeForceBuilderInitialization();
|
||||
}
|
||||
private void maybeForceBuilderInitialization() {
|
||||
if (com.google.protobuf.GeneratedMessageV3
|
||||
.alwaysUseFieldBuilders) {
|
||||
}
|
||||
}
|
||||
public Builder clear() {
|
||||
super.clear();
|
||||
message_ = "";
|
||||
bitField0_ = (bitField0_ & ~0x00000001);
|
||||
return this;
|
||||
}
|
||||
|
||||
public com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptorForType() {
|
||||
return io.grpc.reflection.testing.ReflectionTestDepthTwoProto.internal_static_grpc_reflection_testing_Reply_descriptor;
|
||||
}
|
||||
|
||||
public io.grpc.reflection.testing.Reply getDefaultInstanceForType() {
|
||||
return io.grpc.reflection.testing.Reply.getDefaultInstance();
|
||||
}
|
||||
|
||||
public io.grpc.reflection.testing.Reply build() {
|
||||
io.grpc.reflection.testing.Reply result = buildPartial();
|
||||
if (!result.isInitialized()) {
|
||||
throw newUninitializedMessageException(result);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public io.grpc.reflection.testing.Reply buildPartial() {
|
||||
io.grpc.reflection.testing.Reply result = new io.grpc.reflection.testing.Reply(this);
|
||||
int from_bitField0_ = bitField0_;
|
||||
int to_bitField0_ = 0;
|
||||
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
|
||||
to_bitField0_ |= 0x00000001;
|
||||
}
|
||||
result.message_ = message_;
|
||||
result.bitField0_ = to_bitField0_;
|
||||
onBuilt();
|
||||
return result;
|
||||
}
|
||||
|
||||
public Builder clone() {
|
||||
return (Builder) super.clone();
|
||||
}
|
||||
public Builder setField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||
Object value) {
|
||||
return (Builder) super.setField(field, value);
|
||||
}
|
||||
public Builder clearField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field) {
|
||||
return (Builder) super.clearField(field);
|
||||
}
|
||||
public Builder clearOneof(
|
||||
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
|
||||
return (Builder) super.clearOneof(oneof);
|
||||
}
|
||||
public Builder setRepeatedField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||
int index, Object value) {
|
||||
return (Builder) super.setRepeatedField(field, index, value);
|
||||
}
|
||||
public Builder addRepeatedField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||
Object value) {
|
||||
return (Builder) super.addRepeatedField(field, value);
|
||||
}
|
||||
public Builder mergeFrom(com.google.protobuf.Message other) {
|
||||
if (other instanceof io.grpc.reflection.testing.Reply) {
|
||||
return mergeFrom((io.grpc.reflection.testing.Reply)other);
|
||||
} else {
|
||||
super.mergeFrom(other);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
public Builder mergeFrom(io.grpc.reflection.testing.Reply other) {
|
||||
if (other == io.grpc.reflection.testing.Reply.getDefaultInstance()) return this;
|
||||
if (other.hasMessage()) {
|
||||
bitField0_ |= 0x00000001;
|
||||
message_ = other.message_;
|
||||
onChanged();
|
||||
}
|
||||
this.mergeUnknownFields(other.unknownFields);
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
|
||||
public final boolean isInitialized() {
|
||||
if (!hasMessage()) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public Builder mergeFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
io.grpc.reflection.testing.Reply parsedMessage = null;
|
||||
try {
|
||||
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
|
||||
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||
parsedMessage = (io.grpc.reflection.testing.Reply) e.getUnfinishedMessage();
|
||||
throw e.unwrapIOException();
|
||||
} finally {
|
||||
if (parsedMessage != null) {
|
||||
mergeFrom(parsedMessage);
|
||||
}
|
||||
}
|
||||
return this;
|
||||
}
|
||||
private int bitField0_;
|
||||
|
||||
private java.lang.Object message_ = "";
|
||||
/**
|
||||
* <code>required string message = 1;</code>
|
||||
*/
|
||||
public boolean hasMessage() {
|
||||
return ((bitField0_ & 0x00000001) == 0x00000001);
|
||||
}
|
||||
/**
|
||||
* <code>required string message = 1;</code>
|
||||
*/
|
||||
public java.lang.String getMessage() {
|
||||
java.lang.Object ref = message_;
|
||||
if (!(ref instanceof java.lang.String)) {
|
||||
com.google.protobuf.ByteString bs =
|
||||
(com.google.protobuf.ByteString) ref;
|
||||
java.lang.String s = bs.toStringUtf8();
|
||||
if (bs.isValidUtf8()) {
|
||||
message_ = s;
|
||||
}
|
||||
return s;
|
||||
} else {
|
||||
return (java.lang.String) ref;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* <code>required string message = 1;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getMessageBytes() {
|
||||
java.lang.Object ref = message_;
|
||||
if (ref instanceof String) {
|
||||
com.google.protobuf.ByteString b =
|
||||
com.google.protobuf.ByteString.copyFromUtf8(
|
||||
(java.lang.String) ref);
|
||||
message_ = b;
|
||||
return b;
|
||||
} else {
|
||||
return (com.google.protobuf.ByteString) ref;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* <code>required string message = 1;</code>
|
||||
*/
|
||||
public Builder setMessage(
|
||||
java.lang.String value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
bitField0_ |= 0x00000001;
|
||||
message_ = value;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>required string message = 1;</code>
|
||||
*/
|
||||
public Builder clearMessage() {
|
||||
bitField0_ = (bitField0_ & ~0x00000001);
|
||||
message_ = getDefaultInstance().getMessage();
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>required string message = 1;</code>
|
||||
*/
|
||||
public Builder setMessageBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
bitField0_ |= 0x00000001;
|
||||
message_ = value;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
public final Builder setUnknownFields(
|
||||
final com.google.protobuf.UnknownFieldSet unknownFields) {
|
||||
return super.setUnknownFields(unknownFields);
|
||||
}
|
||||
|
||||
public final Builder mergeUnknownFields(
|
||||
final com.google.protobuf.UnknownFieldSet unknownFields) {
|
||||
return super.mergeUnknownFields(unknownFields);
|
||||
}
|
||||
|
||||
|
||||
// @@protoc_insertion_point(builder_scope:grpc.reflection.testing.Reply)
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:grpc.reflection.testing.Reply)
|
||||
private static final io.grpc.reflection.testing.Reply DEFAULT_INSTANCE;
|
||||
static {
|
||||
DEFAULT_INSTANCE = new io.grpc.reflection.testing.Reply();
|
||||
}
|
||||
|
||||
public static io.grpc.reflection.testing.Reply getDefaultInstance() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
@java.lang.Deprecated public static final com.google.protobuf.Parser<Reply>
|
||||
PARSER = new com.google.protobuf.AbstractParser<Reply>() {
|
||||
public Reply parsePartialFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return new Reply(input, extensionRegistry);
|
||||
}
|
||||
};
|
||||
|
||||
public static com.google.protobuf.Parser<Reply> parser() {
|
||||
return PARSER;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public com.google.protobuf.Parser<Reply> getParserForType() {
|
||||
return PARSER;
|
||||
}
|
||||
|
||||
public io.grpc.reflection.testing.Reply getDefaultInstanceForType() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: io/grpc/reflection/testing/reflection_test_depth_two.proto
|
||||
|
||||
package io.grpc.reflection.testing;
|
||||
|
||||
public interface ReplyOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:grpc.reflection.testing.Reply)
|
||||
com.google.protobuf.MessageOrBuilder {
|
||||
|
||||
/**
|
||||
* <code>required string message = 1;</code>
|
||||
*/
|
||||
boolean hasMessage();
|
||||
/**
|
||||
* <code>required string message = 1;</code>
|
||||
*/
|
||||
java.lang.String getMessage();
|
||||
/**
|
||||
* <code>required string message = 1;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getMessageBytes();
|
||||
}
|
||||
|
|
@ -0,0 +1,538 @@
|
|||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: io/grpc/reflection/testing/reflection_test_depth_two.proto
|
||||
|
||||
package io.grpc.reflection.testing;
|
||||
|
||||
/**
|
||||
* Protobuf type {@code grpc.reflection.testing.Request}
|
||||
*/
|
||||
public final class Request extends
|
||||
com.google.protobuf.GeneratedMessageV3 implements
|
||||
// @@protoc_insertion_point(message_implements:grpc.reflection.testing.Request)
|
||||
RequestOrBuilder {
|
||||
// Use Request.newBuilder() to construct.
|
||||
private Request(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
|
||||
super(builder);
|
||||
}
|
||||
private Request() {
|
||||
message_ = "";
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public final com.google.protobuf.UnknownFieldSet
|
||||
getUnknownFields() {
|
||||
return this.unknownFields;
|
||||
}
|
||||
private Request(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
this();
|
||||
int mutable_bitField0_ = 0;
|
||||
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
|
||||
com.google.protobuf.UnknownFieldSet.newBuilder();
|
||||
try {
|
||||
boolean done = false;
|
||||
while (!done) {
|
||||
int tag = input.readTag();
|
||||
switch (tag) {
|
||||
case 0:
|
||||
done = true;
|
||||
break;
|
||||
default: {
|
||||
if (!parseUnknownField(input, unknownFields,
|
||||
extensionRegistry, tag)) {
|
||||
done = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 10: {
|
||||
com.google.protobuf.ByteString bs = input.readBytes();
|
||||
bitField0_ |= 0x00000001;
|
||||
message_ = bs;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||
throw e.setUnfinishedMessage(this);
|
||||
} catch (java.io.IOException e) {
|
||||
throw new com.google.protobuf.InvalidProtocolBufferException(
|
||||
e).setUnfinishedMessage(this);
|
||||
} finally {
|
||||
this.unknownFields = unknownFields.build();
|
||||
makeExtensionsImmutable();
|
||||
}
|
||||
}
|
||||
public static final com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptor() {
|
||||
return io.grpc.reflection.testing.ReflectionTestDepthTwoProto.internal_static_grpc_reflection_testing_Request_descriptor;
|
||||
}
|
||||
|
||||
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internalGetFieldAccessorTable() {
|
||||
return io.grpc.reflection.testing.ReflectionTestDepthTwoProto.internal_static_grpc_reflection_testing_Request_fieldAccessorTable
|
||||
.ensureFieldAccessorsInitialized(
|
||||
io.grpc.reflection.testing.Request.class, io.grpc.reflection.testing.Request.Builder.class);
|
||||
}
|
||||
|
||||
private int bitField0_;
|
||||
public static final int MESSAGE_FIELD_NUMBER = 1;
|
||||
private volatile java.lang.Object message_;
|
||||
/**
|
||||
* <code>required string message = 1;</code>
|
||||
*/
|
||||
public boolean hasMessage() {
|
||||
return ((bitField0_ & 0x00000001) == 0x00000001);
|
||||
}
|
||||
/**
|
||||
* <code>required string message = 1;</code>
|
||||
*/
|
||||
public java.lang.String getMessage() {
|
||||
java.lang.Object ref = message_;
|
||||
if (ref instanceof java.lang.String) {
|
||||
return (java.lang.String) ref;
|
||||
} else {
|
||||
com.google.protobuf.ByteString bs =
|
||||
(com.google.protobuf.ByteString) ref;
|
||||
java.lang.String s = bs.toStringUtf8();
|
||||
if (bs.isValidUtf8()) {
|
||||
message_ = s;
|
||||
}
|
||||
return s;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* <code>required string message = 1;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getMessageBytes() {
|
||||
java.lang.Object ref = message_;
|
||||
if (ref instanceof java.lang.String) {
|
||||
com.google.protobuf.ByteString b =
|
||||
com.google.protobuf.ByteString.copyFromUtf8(
|
||||
(java.lang.String) ref);
|
||||
message_ = b;
|
||||
return b;
|
||||
} else {
|
||||
return (com.google.protobuf.ByteString) ref;
|
||||
}
|
||||
}
|
||||
|
||||
private byte memoizedIsInitialized = -1;
|
||||
public final boolean isInitialized() {
|
||||
byte isInitialized = memoizedIsInitialized;
|
||||
if (isInitialized == 1) return true;
|
||||
if (isInitialized == 0) return false;
|
||||
|
||||
if (!hasMessage()) {
|
||||
memoizedIsInitialized = 0;
|
||||
return false;
|
||||
}
|
||||
memoizedIsInitialized = 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
public void writeTo(com.google.protobuf.CodedOutputStream output)
|
||||
throws java.io.IOException {
|
||||
if (((bitField0_ & 0x00000001) == 0x00000001)) {
|
||||
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, message_);
|
||||
}
|
||||
unknownFields.writeTo(output);
|
||||
}
|
||||
|
||||
public int getSerializedSize() {
|
||||
int size = memoizedSize;
|
||||
if (size != -1) return size;
|
||||
|
||||
size = 0;
|
||||
if (((bitField0_ & 0x00000001) == 0x00000001)) {
|
||||
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, message_);
|
||||
}
|
||||
size += unknownFields.getSerializedSize();
|
||||
memoizedSize = size;
|
||||
return size;
|
||||
}
|
||||
|
||||
private static final long serialVersionUID = 0L;
|
||||
@java.lang.Override
|
||||
public boolean equals(final java.lang.Object obj) {
|
||||
if (obj == this) {
|
||||
return true;
|
||||
}
|
||||
if (!(obj instanceof io.grpc.reflection.testing.Request)) {
|
||||
return super.equals(obj);
|
||||
}
|
||||
io.grpc.reflection.testing.Request other = (io.grpc.reflection.testing.Request) obj;
|
||||
|
||||
boolean result = true;
|
||||
result = result && (hasMessage() == other.hasMessage());
|
||||
if (hasMessage()) {
|
||||
result = result && getMessage()
|
||||
.equals(other.getMessage());
|
||||
}
|
||||
result = result && unknownFields.equals(other.unknownFields);
|
||||
return result;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public int hashCode() {
|
||||
if (memoizedHashCode != 0) {
|
||||
return memoizedHashCode;
|
||||
}
|
||||
int hash = 41;
|
||||
hash = (19 * hash) + getDescriptorForType().hashCode();
|
||||
if (hasMessage()) {
|
||||
hash = (37 * hash) + MESSAGE_FIELD_NUMBER;
|
||||
hash = (53 * hash) + getMessage().hashCode();
|
||||
}
|
||||
hash = (29 * hash) + unknownFields.hashCode();
|
||||
memoizedHashCode = hash;
|
||||
return hash;
|
||||
}
|
||||
|
||||
public static io.grpc.reflection.testing.Request parseFrom(
|
||||
com.google.protobuf.ByteString data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static io.grpc.reflection.testing.Request parseFrom(
|
||||
com.google.protobuf.ByteString data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
public static io.grpc.reflection.testing.Request parseFrom(byte[] data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static io.grpc.reflection.testing.Request parseFrom(
|
||||
byte[] data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
public static io.grpc.reflection.testing.Request parseFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input);
|
||||
}
|
||||
public static io.grpc.reflection.testing.Request parseFrom(
|
||||
java.io.InputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
public static io.grpc.reflection.testing.Request parseDelimitedFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseDelimitedWithIOException(PARSER, input);
|
||||
}
|
||||
public static io.grpc.reflection.testing.Request parseDelimitedFrom(
|
||||
java.io.InputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
public static io.grpc.reflection.testing.Request parseFrom(
|
||||
com.google.protobuf.CodedInputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input);
|
||||
}
|
||||
public static io.grpc.reflection.testing.Request parseFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
|
||||
public Builder newBuilderForType() { return newBuilder(); }
|
||||
public static Builder newBuilder() {
|
||||
return DEFAULT_INSTANCE.toBuilder();
|
||||
}
|
||||
public static Builder newBuilder(io.grpc.reflection.testing.Request prototype) {
|
||||
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
|
||||
}
|
||||
public Builder toBuilder() {
|
||||
return this == DEFAULT_INSTANCE
|
||||
? new Builder() : new Builder().mergeFrom(this);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
protected Builder newBuilderForType(
|
||||
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
|
||||
Builder builder = new Builder(parent);
|
||||
return builder;
|
||||
}
|
||||
/**
|
||||
* Protobuf type {@code grpc.reflection.testing.Request}
|
||||
*/
|
||||
public static final class Builder extends
|
||||
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
|
||||
// @@protoc_insertion_point(builder_implements:grpc.reflection.testing.Request)
|
||||
io.grpc.reflection.testing.RequestOrBuilder {
|
||||
public static final com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptor() {
|
||||
return io.grpc.reflection.testing.ReflectionTestDepthTwoProto.internal_static_grpc_reflection_testing_Request_descriptor;
|
||||
}
|
||||
|
||||
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internalGetFieldAccessorTable() {
|
||||
return io.grpc.reflection.testing.ReflectionTestDepthTwoProto.internal_static_grpc_reflection_testing_Request_fieldAccessorTable
|
||||
.ensureFieldAccessorsInitialized(
|
||||
io.grpc.reflection.testing.Request.class, io.grpc.reflection.testing.Request.Builder.class);
|
||||
}
|
||||
|
||||
// Construct using io.grpc.reflection.testing.Request.newBuilder()
|
||||
private Builder() {
|
||||
maybeForceBuilderInitialization();
|
||||
}
|
||||
|
||||
private Builder(
|
||||
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
|
||||
super(parent);
|
||||
maybeForceBuilderInitialization();
|
||||
}
|
||||
private void maybeForceBuilderInitialization() {
|
||||
if (com.google.protobuf.GeneratedMessageV3
|
||||
.alwaysUseFieldBuilders) {
|
||||
}
|
||||
}
|
||||
public Builder clear() {
|
||||
super.clear();
|
||||
message_ = "";
|
||||
bitField0_ = (bitField0_ & ~0x00000001);
|
||||
return this;
|
||||
}
|
||||
|
||||
public com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptorForType() {
|
||||
return io.grpc.reflection.testing.ReflectionTestDepthTwoProto.internal_static_grpc_reflection_testing_Request_descriptor;
|
||||
}
|
||||
|
||||
public io.grpc.reflection.testing.Request getDefaultInstanceForType() {
|
||||
return io.grpc.reflection.testing.Request.getDefaultInstance();
|
||||
}
|
||||
|
||||
public io.grpc.reflection.testing.Request build() {
|
||||
io.grpc.reflection.testing.Request result = buildPartial();
|
||||
if (!result.isInitialized()) {
|
||||
throw newUninitializedMessageException(result);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public io.grpc.reflection.testing.Request buildPartial() {
|
||||
io.grpc.reflection.testing.Request result = new io.grpc.reflection.testing.Request(this);
|
||||
int from_bitField0_ = bitField0_;
|
||||
int to_bitField0_ = 0;
|
||||
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
|
||||
to_bitField0_ |= 0x00000001;
|
||||
}
|
||||
result.message_ = message_;
|
||||
result.bitField0_ = to_bitField0_;
|
||||
onBuilt();
|
||||
return result;
|
||||
}
|
||||
|
||||
public Builder clone() {
|
||||
return (Builder) super.clone();
|
||||
}
|
||||
public Builder setField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||
Object value) {
|
||||
return (Builder) super.setField(field, value);
|
||||
}
|
||||
public Builder clearField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field) {
|
||||
return (Builder) super.clearField(field);
|
||||
}
|
||||
public Builder clearOneof(
|
||||
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
|
||||
return (Builder) super.clearOneof(oneof);
|
||||
}
|
||||
public Builder setRepeatedField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||
int index, Object value) {
|
||||
return (Builder) super.setRepeatedField(field, index, value);
|
||||
}
|
||||
public Builder addRepeatedField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||
Object value) {
|
||||
return (Builder) super.addRepeatedField(field, value);
|
||||
}
|
||||
public Builder mergeFrom(com.google.protobuf.Message other) {
|
||||
if (other instanceof io.grpc.reflection.testing.Request) {
|
||||
return mergeFrom((io.grpc.reflection.testing.Request)other);
|
||||
} else {
|
||||
super.mergeFrom(other);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
public Builder mergeFrom(io.grpc.reflection.testing.Request other) {
|
||||
if (other == io.grpc.reflection.testing.Request.getDefaultInstance()) return this;
|
||||
if (other.hasMessage()) {
|
||||
bitField0_ |= 0x00000001;
|
||||
message_ = other.message_;
|
||||
onChanged();
|
||||
}
|
||||
this.mergeUnknownFields(other.unknownFields);
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
|
||||
public final boolean isInitialized() {
|
||||
if (!hasMessage()) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public Builder mergeFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
io.grpc.reflection.testing.Request parsedMessage = null;
|
||||
try {
|
||||
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
|
||||
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||
parsedMessage = (io.grpc.reflection.testing.Request) e.getUnfinishedMessage();
|
||||
throw e.unwrapIOException();
|
||||
} finally {
|
||||
if (parsedMessage != null) {
|
||||
mergeFrom(parsedMessage);
|
||||
}
|
||||
}
|
||||
return this;
|
||||
}
|
||||
private int bitField0_;
|
||||
|
||||
private java.lang.Object message_ = "";
|
||||
/**
|
||||
* <code>required string message = 1;</code>
|
||||
*/
|
||||
public boolean hasMessage() {
|
||||
return ((bitField0_ & 0x00000001) == 0x00000001);
|
||||
}
|
||||
/**
|
||||
* <code>required string message = 1;</code>
|
||||
*/
|
||||
public java.lang.String getMessage() {
|
||||
java.lang.Object ref = message_;
|
||||
if (!(ref instanceof java.lang.String)) {
|
||||
com.google.protobuf.ByteString bs =
|
||||
(com.google.protobuf.ByteString) ref;
|
||||
java.lang.String s = bs.toStringUtf8();
|
||||
if (bs.isValidUtf8()) {
|
||||
message_ = s;
|
||||
}
|
||||
return s;
|
||||
} else {
|
||||
return (java.lang.String) ref;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* <code>required string message = 1;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getMessageBytes() {
|
||||
java.lang.Object ref = message_;
|
||||
if (ref instanceof String) {
|
||||
com.google.protobuf.ByteString b =
|
||||
com.google.protobuf.ByteString.copyFromUtf8(
|
||||
(java.lang.String) ref);
|
||||
message_ = b;
|
||||
return b;
|
||||
} else {
|
||||
return (com.google.protobuf.ByteString) ref;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* <code>required string message = 1;</code>
|
||||
*/
|
||||
public Builder setMessage(
|
||||
java.lang.String value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
bitField0_ |= 0x00000001;
|
||||
message_ = value;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>required string message = 1;</code>
|
||||
*/
|
||||
public Builder clearMessage() {
|
||||
bitField0_ = (bitField0_ & ~0x00000001);
|
||||
message_ = getDefaultInstance().getMessage();
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>required string message = 1;</code>
|
||||
*/
|
||||
public Builder setMessageBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
bitField0_ |= 0x00000001;
|
||||
message_ = value;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
public final Builder setUnknownFields(
|
||||
final com.google.protobuf.UnknownFieldSet unknownFields) {
|
||||
return super.setUnknownFields(unknownFields);
|
||||
}
|
||||
|
||||
public final Builder mergeUnknownFields(
|
||||
final com.google.protobuf.UnknownFieldSet unknownFields) {
|
||||
return super.mergeUnknownFields(unknownFields);
|
||||
}
|
||||
|
||||
|
||||
// @@protoc_insertion_point(builder_scope:grpc.reflection.testing.Request)
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:grpc.reflection.testing.Request)
|
||||
private static final io.grpc.reflection.testing.Request DEFAULT_INSTANCE;
|
||||
static {
|
||||
DEFAULT_INSTANCE = new io.grpc.reflection.testing.Request();
|
||||
}
|
||||
|
||||
public static io.grpc.reflection.testing.Request getDefaultInstance() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
@java.lang.Deprecated public static final com.google.protobuf.Parser<Request>
|
||||
PARSER = new com.google.protobuf.AbstractParser<Request>() {
|
||||
public Request parsePartialFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return new Request(input, extensionRegistry);
|
||||
}
|
||||
};
|
||||
|
||||
public static com.google.protobuf.Parser<Request> parser() {
|
||||
return PARSER;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public com.google.protobuf.Parser<Request> getParserForType() {
|
||||
return PARSER;
|
||||
}
|
||||
|
||||
public io.grpc.reflection.testing.Request getDefaultInstanceForType() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: io/grpc/reflection/testing/reflection_test_depth_two.proto
|
||||
|
||||
package io.grpc.reflection.testing;
|
||||
|
||||
public interface RequestOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:grpc.reflection.testing.Request)
|
||||
com.google.protobuf.MessageOrBuilder {
|
||||
|
||||
/**
|
||||
* <code>required string message = 1;</code>
|
||||
*/
|
||||
boolean hasMessage();
|
||||
/**
|
||||
* <code>required string message = 1;</code>
|
||||
*/
|
||||
java.lang.String getMessage();
|
||||
/**
|
||||
* <code>required string message = 1;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getMessageBytes();
|
||||
}
|
||||
|
|
@ -0,0 +1,579 @@
|
|||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: io/grpc/reflection/testing/reflection_test_depth_three.proto
|
||||
|
||||
package io.grpc.reflection.testing;
|
||||
|
||||
/**
|
||||
* Protobuf type {@code grpc.reflection.testing.ThirdLevelType}
|
||||
*/
|
||||
public final class ThirdLevelType extends
|
||||
com.google.protobuf.GeneratedMessageV3.ExtendableMessage<
|
||||
ThirdLevelType> implements
|
||||
// @@protoc_insertion_point(message_implements:grpc.reflection.testing.ThirdLevelType)
|
||||
ThirdLevelTypeOrBuilder {
|
||||
// Use ThirdLevelType.newBuilder() to construct.
|
||||
private ThirdLevelType(com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<io.grpc.reflection.testing.ThirdLevelType, ?> builder) {
|
||||
super(builder);
|
||||
}
|
||||
private ThirdLevelType() {
|
||||
message_ = "";
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public final com.google.protobuf.UnknownFieldSet
|
||||
getUnknownFields() {
|
||||
return this.unknownFields;
|
||||
}
|
||||
private ThirdLevelType(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
this();
|
||||
int mutable_bitField0_ = 0;
|
||||
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
|
||||
com.google.protobuf.UnknownFieldSet.newBuilder();
|
||||
try {
|
||||
boolean done = false;
|
||||
while (!done) {
|
||||
int tag = input.readTag();
|
||||
switch (tag) {
|
||||
case 0:
|
||||
done = true;
|
||||
break;
|
||||
default: {
|
||||
if (!parseUnknownField(input, unknownFields,
|
||||
extensionRegistry, tag)) {
|
||||
done = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 10: {
|
||||
com.google.protobuf.ByteString bs = input.readBytes();
|
||||
bitField0_ |= 0x00000001;
|
||||
message_ = bs;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||
throw e.setUnfinishedMessage(this);
|
||||
} catch (java.io.IOException e) {
|
||||
throw new com.google.protobuf.InvalidProtocolBufferException(
|
||||
e).setUnfinishedMessage(this);
|
||||
} finally {
|
||||
this.unknownFields = unknownFields.build();
|
||||
makeExtensionsImmutable();
|
||||
}
|
||||
}
|
||||
public static final com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptor() {
|
||||
return io.grpc.reflection.testing.ReflectionTestDepthThreeProto.internal_static_grpc_reflection_testing_ThirdLevelType_descriptor;
|
||||
}
|
||||
|
||||
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internalGetFieldAccessorTable() {
|
||||
return io.grpc.reflection.testing.ReflectionTestDepthThreeProto.internal_static_grpc_reflection_testing_ThirdLevelType_fieldAccessorTable
|
||||
.ensureFieldAccessorsInitialized(
|
||||
io.grpc.reflection.testing.ThirdLevelType.class, io.grpc.reflection.testing.ThirdLevelType.Builder.class);
|
||||
}
|
||||
|
||||
private int bitField0_;
|
||||
public static final int MESSAGE_FIELD_NUMBER = 1;
|
||||
private volatile java.lang.Object message_;
|
||||
/**
|
||||
* <code>required string message = 1;</code>
|
||||
*/
|
||||
public boolean hasMessage() {
|
||||
return ((bitField0_ & 0x00000001) == 0x00000001);
|
||||
}
|
||||
/**
|
||||
* <code>required string message = 1;</code>
|
||||
*/
|
||||
public java.lang.String getMessage() {
|
||||
java.lang.Object ref = message_;
|
||||
if (ref instanceof java.lang.String) {
|
||||
return (java.lang.String) ref;
|
||||
} else {
|
||||
com.google.protobuf.ByteString bs =
|
||||
(com.google.protobuf.ByteString) ref;
|
||||
java.lang.String s = bs.toStringUtf8();
|
||||
if (bs.isValidUtf8()) {
|
||||
message_ = s;
|
||||
}
|
||||
return s;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* <code>required string message = 1;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getMessageBytes() {
|
||||
java.lang.Object ref = message_;
|
||||
if (ref instanceof java.lang.String) {
|
||||
com.google.protobuf.ByteString b =
|
||||
com.google.protobuf.ByteString.copyFromUtf8(
|
||||
(java.lang.String) ref);
|
||||
message_ = b;
|
||||
return b;
|
||||
} else {
|
||||
return (com.google.protobuf.ByteString) ref;
|
||||
}
|
||||
}
|
||||
|
||||
private byte memoizedIsInitialized = -1;
|
||||
public final boolean isInitialized() {
|
||||
byte isInitialized = memoizedIsInitialized;
|
||||
if (isInitialized == 1) return true;
|
||||
if (isInitialized == 0) return false;
|
||||
|
||||
if (!hasMessage()) {
|
||||
memoizedIsInitialized = 0;
|
||||
return false;
|
||||
}
|
||||
if (!extensionsAreInitialized()) {
|
||||
memoizedIsInitialized = 0;
|
||||
return false;
|
||||
}
|
||||
memoizedIsInitialized = 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
public void writeTo(com.google.protobuf.CodedOutputStream output)
|
||||
throws java.io.IOException {
|
||||
com.google.protobuf.GeneratedMessageV3
|
||||
.ExtendableMessage<io.grpc.reflection.testing.ThirdLevelType>.ExtensionWriter
|
||||
extensionWriter = newExtensionWriter();
|
||||
if (((bitField0_ & 0x00000001) == 0x00000001)) {
|
||||
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, message_);
|
||||
}
|
||||
extensionWriter.writeUntil(200, output);
|
||||
unknownFields.writeTo(output);
|
||||
}
|
||||
|
||||
public int getSerializedSize() {
|
||||
int size = memoizedSize;
|
||||
if (size != -1) return size;
|
||||
|
||||
size = 0;
|
||||
if (((bitField0_ & 0x00000001) == 0x00000001)) {
|
||||
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, message_);
|
||||
}
|
||||
size += extensionsSerializedSize();
|
||||
size += unknownFields.getSerializedSize();
|
||||
memoizedSize = size;
|
||||
return size;
|
||||
}
|
||||
|
||||
private static final long serialVersionUID = 0L;
|
||||
@java.lang.Override
|
||||
public boolean equals(final java.lang.Object obj) {
|
||||
if (obj == this) {
|
||||
return true;
|
||||
}
|
||||
if (!(obj instanceof io.grpc.reflection.testing.ThirdLevelType)) {
|
||||
return super.equals(obj);
|
||||
}
|
||||
io.grpc.reflection.testing.ThirdLevelType other = (io.grpc.reflection.testing.ThirdLevelType) obj;
|
||||
|
||||
boolean result = true;
|
||||
result = result && (hasMessage() == other.hasMessage());
|
||||
if (hasMessage()) {
|
||||
result = result && getMessage()
|
||||
.equals(other.getMessage());
|
||||
}
|
||||
result = result && unknownFields.equals(other.unknownFields);
|
||||
result = result &&
|
||||
getExtensionFields().equals(other.getExtensionFields());
|
||||
return result;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public int hashCode() {
|
||||
if (memoizedHashCode != 0) {
|
||||
return memoizedHashCode;
|
||||
}
|
||||
int hash = 41;
|
||||
hash = (19 * hash) + getDescriptorForType().hashCode();
|
||||
if (hasMessage()) {
|
||||
hash = (37 * hash) + MESSAGE_FIELD_NUMBER;
|
||||
hash = (53 * hash) + getMessage().hashCode();
|
||||
}
|
||||
hash = hashFields(hash, getExtensionFields());
|
||||
hash = (29 * hash) + unknownFields.hashCode();
|
||||
memoizedHashCode = hash;
|
||||
return hash;
|
||||
}
|
||||
|
||||
public static io.grpc.reflection.testing.ThirdLevelType parseFrom(
|
||||
com.google.protobuf.ByteString data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static io.grpc.reflection.testing.ThirdLevelType parseFrom(
|
||||
com.google.protobuf.ByteString data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
public static io.grpc.reflection.testing.ThirdLevelType parseFrom(byte[] data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static io.grpc.reflection.testing.ThirdLevelType parseFrom(
|
||||
byte[] data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
public static io.grpc.reflection.testing.ThirdLevelType parseFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input);
|
||||
}
|
||||
public static io.grpc.reflection.testing.ThirdLevelType parseFrom(
|
||||
java.io.InputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
public static io.grpc.reflection.testing.ThirdLevelType parseDelimitedFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseDelimitedWithIOException(PARSER, input);
|
||||
}
|
||||
public static io.grpc.reflection.testing.ThirdLevelType parseDelimitedFrom(
|
||||
java.io.InputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
public static io.grpc.reflection.testing.ThirdLevelType parseFrom(
|
||||
com.google.protobuf.CodedInputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input);
|
||||
}
|
||||
public static io.grpc.reflection.testing.ThirdLevelType parseFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
|
||||
public Builder newBuilderForType() { return newBuilder(); }
|
||||
public static Builder newBuilder() {
|
||||
return DEFAULT_INSTANCE.toBuilder();
|
||||
}
|
||||
public static Builder newBuilder(io.grpc.reflection.testing.ThirdLevelType prototype) {
|
||||
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
|
||||
}
|
||||
public Builder toBuilder() {
|
||||
return this == DEFAULT_INSTANCE
|
||||
? new Builder() : new Builder().mergeFrom(this);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
protected Builder newBuilderForType(
|
||||
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
|
||||
Builder builder = new Builder(parent);
|
||||
return builder;
|
||||
}
|
||||
/**
|
||||
* Protobuf type {@code grpc.reflection.testing.ThirdLevelType}
|
||||
*/
|
||||
public static final class Builder extends
|
||||
com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<
|
||||
io.grpc.reflection.testing.ThirdLevelType, Builder> implements
|
||||
// @@protoc_insertion_point(builder_implements:grpc.reflection.testing.ThirdLevelType)
|
||||
io.grpc.reflection.testing.ThirdLevelTypeOrBuilder {
|
||||
public static final com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptor() {
|
||||
return io.grpc.reflection.testing.ReflectionTestDepthThreeProto.internal_static_grpc_reflection_testing_ThirdLevelType_descriptor;
|
||||
}
|
||||
|
||||
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internalGetFieldAccessorTable() {
|
||||
return io.grpc.reflection.testing.ReflectionTestDepthThreeProto.internal_static_grpc_reflection_testing_ThirdLevelType_fieldAccessorTable
|
||||
.ensureFieldAccessorsInitialized(
|
||||
io.grpc.reflection.testing.ThirdLevelType.class, io.grpc.reflection.testing.ThirdLevelType.Builder.class);
|
||||
}
|
||||
|
||||
// Construct using io.grpc.reflection.testing.ThirdLevelType.newBuilder()
|
||||
private Builder() {
|
||||
maybeForceBuilderInitialization();
|
||||
}
|
||||
|
||||
private Builder(
|
||||
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
|
||||
super(parent);
|
||||
maybeForceBuilderInitialization();
|
||||
}
|
||||
private void maybeForceBuilderInitialization() {
|
||||
if (com.google.protobuf.GeneratedMessageV3
|
||||
.alwaysUseFieldBuilders) {
|
||||
}
|
||||
}
|
||||
public Builder clear() {
|
||||
super.clear();
|
||||
message_ = "";
|
||||
bitField0_ = (bitField0_ & ~0x00000001);
|
||||
return this;
|
||||
}
|
||||
|
||||
public com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptorForType() {
|
||||
return io.grpc.reflection.testing.ReflectionTestDepthThreeProto.internal_static_grpc_reflection_testing_ThirdLevelType_descriptor;
|
||||
}
|
||||
|
||||
public io.grpc.reflection.testing.ThirdLevelType getDefaultInstanceForType() {
|
||||
return io.grpc.reflection.testing.ThirdLevelType.getDefaultInstance();
|
||||
}
|
||||
|
||||
public io.grpc.reflection.testing.ThirdLevelType build() {
|
||||
io.grpc.reflection.testing.ThirdLevelType result = buildPartial();
|
||||
if (!result.isInitialized()) {
|
||||
throw newUninitializedMessageException(result);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public io.grpc.reflection.testing.ThirdLevelType buildPartial() {
|
||||
io.grpc.reflection.testing.ThirdLevelType result = new io.grpc.reflection.testing.ThirdLevelType(this);
|
||||
int from_bitField0_ = bitField0_;
|
||||
int to_bitField0_ = 0;
|
||||
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
|
||||
to_bitField0_ |= 0x00000001;
|
||||
}
|
||||
result.message_ = message_;
|
||||
result.bitField0_ = to_bitField0_;
|
||||
onBuilt();
|
||||
return result;
|
||||
}
|
||||
|
||||
public Builder clone() {
|
||||
return (Builder) super.clone();
|
||||
}
|
||||
public Builder setField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||
Object value) {
|
||||
return (Builder) super.setField(field, value);
|
||||
}
|
||||
public Builder clearField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field) {
|
||||
return (Builder) super.clearField(field);
|
||||
}
|
||||
public Builder clearOneof(
|
||||
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
|
||||
return (Builder) super.clearOneof(oneof);
|
||||
}
|
||||
public Builder setRepeatedField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||
int index, Object value) {
|
||||
return (Builder) super.setRepeatedField(field, index, value);
|
||||
}
|
||||
public Builder addRepeatedField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||
Object value) {
|
||||
return (Builder) super.addRepeatedField(field, value);
|
||||
}
|
||||
public <Type> Builder setExtension(
|
||||
com.google.protobuf.GeneratedMessage.GeneratedExtension<
|
||||
io.grpc.reflection.testing.ThirdLevelType, Type> extension,
|
||||
Type value) {
|
||||
return (Builder) super.setExtension(extension, value);
|
||||
}
|
||||
public <Type> Builder setExtension(
|
||||
com.google.protobuf.GeneratedMessage.GeneratedExtension<
|
||||
io.grpc.reflection.testing.ThirdLevelType, java.util.List<Type>> extension,
|
||||
int index, Type value) {
|
||||
return (Builder) super.setExtension(extension, index, value);
|
||||
}
|
||||
public <Type> Builder addExtension(
|
||||
com.google.protobuf.GeneratedMessage.GeneratedExtension<
|
||||
io.grpc.reflection.testing.ThirdLevelType, java.util.List<Type>> extension,
|
||||
Type value) {
|
||||
return (Builder) super.addExtension(extension, value);
|
||||
}
|
||||
public <Type> Builder clearExtension(
|
||||
com.google.protobuf.GeneratedMessage.GeneratedExtension<
|
||||
io.grpc.reflection.testing.ThirdLevelType, ?> extension) {
|
||||
return (Builder) super.clearExtension(extension);
|
||||
}
|
||||
public Builder mergeFrom(com.google.protobuf.Message other) {
|
||||
if (other instanceof io.grpc.reflection.testing.ThirdLevelType) {
|
||||
return mergeFrom((io.grpc.reflection.testing.ThirdLevelType)other);
|
||||
} else {
|
||||
super.mergeFrom(other);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
public Builder mergeFrom(io.grpc.reflection.testing.ThirdLevelType other) {
|
||||
if (other == io.grpc.reflection.testing.ThirdLevelType.getDefaultInstance()) return this;
|
||||
if (other.hasMessage()) {
|
||||
bitField0_ |= 0x00000001;
|
||||
message_ = other.message_;
|
||||
onChanged();
|
||||
}
|
||||
this.mergeExtensionFields(other);
|
||||
this.mergeUnknownFields(other.unknownFields);
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
|
||||
public final boolean isInitialized() {
|
||||
if (!hasMessage()) {
|
||||
return false;
|
||||
}
|
||||
if (!extensionsAreInitialized()) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public Builder mergeFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
io.grpc.reflection.testing.ThirdLevelType parsedMessage = null;
|
||||
try {
|
||||
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
|
||||
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||
parsedMessage = (io.grpc.reflection.testing.ThirdLevelType) e.getUnfinishedMessage();
|
||||
throw e.unwrapIOException();
|
||||
} finally {
|
||||
if (parsedMessage != null) {
|
||||
mergeFrom(parsedMessage);
|
||||
}
|
||||
}
|
||||
return this;
|
||||
}
|
||||
private int bitField0_;
|
||||
|
||||
private java.lang.Object message_ = "";
|
||||
/**
|
||||
* <code>required string message = 1;</code>
|
||||
*/
|
||||
public boolean hasMessage() {
|
||||
return ((bitField0_ & 0x00000001) == 0x00000001);
|
||||
}
|
||||
/**
|
||||
* <code>required string message = 1;</code>
|
||||
*/
|
||||
public java.lang.String getMessage() {
|
||||
java.lang.Object ref = message_;
|
||||
if (!(ref instanceof java.lang.String)) {
|
||||
com.google.protobuf.ByteString bs =
|
||||
(com.google.protobuf.ByteString) ref;
|
||||
java.lang.String s = bs.toStringUtf8();
|
||||
if (bs.isValidUtf8()) {
|
||||
message_ = s;
|
||||
}
|
||||
return s;
|
||||
} else {
|
||||
return (java.lang.String) ref;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* <code>required string message = 1;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getMessageBytes() {
|
||||
java.lang.Object ref = message_;
|
||||
if (ref instanceof String) {
|
||||
com.google.protobuf.ByteString b =
|
||||
com.google.protobuf.ByteString.copyFromUtf8(
|
||||
(java.lang.String) ref);
|
||||
message_ = b;
|
||||
return b;
|
||||
} else {
|
||||
return (com.google.protobuf.ByteString) ref;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* <code>required string message = 1;</code>
|
||||
*/
|
||||
public Builder setMessage(
|
||||
java.lang.String value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
bitField0_ |= 0x00000001;
|
||||
message_ = value;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>required string message = 1;</code>
|
||||
*/
|
||||
public Builder clearMessage() {
|
||||
bitField0_ = (bitField0_ & ~0x00000001);
|
||||
message_ = getDefaultInstance().getMessage();
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>required string message = 1;</code>
|
||||
*/
|
||||
public Builder setMessageBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
bitField0_ |= 0x00000001;
|
||||
message_ = value;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
public final Builder setUnknownFields(
|
||||
final com.google.protobuf.UnknownFieldSet unknownFields) {
|
||||
return super.setUnknownFields(unknownFields);
|
||||
}
|
||||
|
||||
public final Builder mergeUnknownFields(
|
||||
final com.google.protobuf.UnknownFieldSet unknownFields) {
|
||||
return super.mergeUnknownFields(unknownFields);
|
||||
}
|
||||
|
||||
|
||||
// @@protoc_insertion_point(builder_scope:grpc.reflection.testing.ThirdLevelType)
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:grpc.reflection.testing.ThirdLevelType)
|
||||
private static final io.grpc.reflection.testing.ThirdLevelType DEFAULT_INSTANCE;
|
||||
static {
|
||||
DEFAULT_INSTANCE = new io.grpc.reflection.testing.ThirdLevelType();
|
||||
}
|
||||
|
||||
public static io.grpc.reflection.testing.ThirdLevelType getDefaultInstance() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
@java.lang.Deprecated public static final com.google.protobuf.Parser<ThirdLevelType>
|
||||
PARSER = new com.google.protobuf.AbstractParser<ThirdLevelType>() {
|
||||
public ThirdLevelType parsePartialFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return new ThirdLevelType(input, extensionRegistry);
|
||||
}
|
||||
};
|
||||
|
||||
public static com.google.protobuf.Parser<ThirdLevelType> parser() {
|
||||
return PARSER;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public com.google.protobuf.Parser<ThirdLevelType> getParserForType() {
|
||||
return PARSER;
|
||||
}
|
||||
|
||||
public io.grpc.reflection.testing.ThirdLevelType getDefaultInstanceForType() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: io/grpc/reflection/testing/reflection_test_depth_three.proto
|
||||
|
||||
package io.grpc.reflection.testing;
|
||||
|
||||
public interface ThirdLevelTypeOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:grpc.reflection.testing.ThirdLevelType)
|
||||
com.google.protobuf.GeneratedMessageV3.
|
||||
ExtendableMessageOrBuilder<ThirdLevelType> {
|
||||
|
||||
/**
|
||||
* <code>required string message = 1;</code>
|
||||
*/
|
||||
boolean hasMessage();
|
||||
/**
|
||||
* <code>required string message = 1;</code>
|
||||
*/
|
||||
java.lang.String getMessage();
|
||||
/**
|
||||
* <code>required string message = 1;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getMessageBytes();
|
||||
}
|
||||
|
|
@ -0,0 +1,345 @@
|
|||
/*
|
||||
* Copyright 2016, Google Inc. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
* met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above
|
||||
* copyright notice, this list of conditions and the following disclaimer
|
||||
* in the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
*
|
||||
* * Neither the name of Google Inc. nor the names of its
|
||||
* contributors may be used to endorse or promote products derived from
|
||||
* this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package io.grpc.protobuf.service;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
import com.google.protobuf.Descriptors.Descriptor;
|
||||
import com.google.protobuf.Descriptors.FieldDescriptor;
|
||||
import com.google.protobuf.Descriptors.FileDescriptor;
|
||||
import com.google.protobuf.Descriptors.MethodDescriptor;
|
||||
import com.google.protobuf.Descriptors.ServiceDescriptor;
|
||||
|
||||
import io.grpc.ExperimentalApi;
|
||||
import io.grpc.InternalNotifyOnServerBuild;
|
||||
import io.grpc.Server;
|
||||
import io.grpc.ServerServiceDefinition;
|
||||
import io.grpc.Status;
|
||||
import io.grpc.protobuf.ProtoFileDescriptorSupplier;
|
||||
import io.grpc.reflection.v1alpha.ErrorResponse;
|
||||
import io.grpc.reflection.v1alpha.ExtensionNumberResponse;
|
||||
import io.grpc.reflection.v1alpha.ExtensionRequest;
|
||||
import io.grpc.reflection.v1alpha.FileDescriptorResponse;
|
||||
import io.grpc.reflection.v1alpha.ListServiceResponse;
|
||||
import io.grpc.reflection.v1alpha.ServerReflectionGrpc;
|
||||
import io.grpc.reflection.v1alpha.ServerReflectionRequest;
|
||||
import io.grpc.reflection.v1alpha.ServerReflectionResponse;
|
||||
import io.grpc.reflection.v1alpha.ServiceResponse;
|
||||
import io.grpc.stub.StreamObserver;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Queue;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* Provides a reflection service for Protobuf services (including the reflection service itself).
|
||||
*
|
||||
* <p>Throws an exception if the set of services contain multiple protobuf files with declarations
|
||||
* of the same service, method, type, or extension.
|
||||
*/
|
||||
@ExperimentalApi("https://github.com/grpc/grpc-java/issues/2222")
|
||||
public final class ProtoReflectionService extends ServerReflectionGrpc.ServerReflectionImplBase
|
||||
implements InternalNotifyOnServerBuild {
|
||||
|
||||
private Server server;
|
||||
|
||||
/**
|
||||
* Retrieves the services registered to the server at build time, and stores those services with a
|
||||
* {@link ProtoFileDescriptorSupplier}. Subsequent calls to the method will have no effect.
|
||||
*/
|
||||
@Override
|
||||
public void notifyOnBuild(Server server) {
|
||||
Preconditions.checkState(this.server == null);
|
||||
this.server = Preconditions.checkNotNull(server, "server");
|
||||
}
|
||||
|
||||
@Override
|
||||
public StreamObserver<ServerReflectionRequest> serverReflectionInfo(
|
||||
final StreamObserver<ServerReflectionResponse> responseObserver) {
|
||||
return new ProtoReflectionStreamObserver(responseObserver);
|
||||
}
|
||||
|
||||
private class ProtoReflectionStreamObserver implements StreamObserver<ServerReflectionRequest> {
|
||||
private final StreamObserver<ServerReflectionResponse> responseObserver;
|
||||
private Set<String> serviceNames;
|
||||
private Map<String, FileDescriptor> fileDescriptorsByName;
|
||||
private Map<String, FileDescriptor> fileDescriptorsBySymbol;
|
||||
private Map<String, Map<Integer, FileDescriptor>> fileDescriptorsByExtensionAndNumber;
|
||||
|
||||
ProtoReflectionStreamObserver(StreamObserver<ServerReflectionResponse> responseObserver) {
|
||||
this.responseObserver = responseObserver;
|
||||
}
|
||||
|
||||
private void processExtension(FieldDescriptor extension, FileDescriptor fd) {
|
||||
String extensionName = extension.getContainingType().getFullName();
|
||||
int extensionNumber = extension.getNumber();
|
||||
if (!fileDescriptorsByExtensionAndNumber.containsKey(extensionName)) {
|
||||
fileDescriptorsByExtensionAndNumber.put(
|
||||
extensionName, new HashMap<Integer, FileDescriptor>());
|
||||
}
|
||||
Preconditions.checkState(
|
||||
!fileDescriptorsByExtensionAndNumber.get(extensionName).containsKey(extensionNumber),
|
||||
"Extension name and number already defined: %s, %s", extensionName, extensionNumber);
|
||||
fileDescriptorsByExtensionAndNumber.get(extensionName).put(extensionNumber, fd);
|
||||
}
|
||||
|
||||
private void processService(ServiceDescriptor service, FileDescriptor fd) {
|
||||
String serviceName = service.getFullName();
|
||||
Preconditions.checkState(!fileDescriptorsBySymbol.containsKey(serviceName),
|
||||
"Service already defined: %s", serviceName);
|
||||
fileDescriptorsBySymbol.put(serviceName, fd);
|
||||
for (MethodDescriptor method : service.getMethods()) {
|
||||
String methodName = method.getFullName();
|
||||
Preconditions.checkState(!fileDescriptorsBySymbol.containsKey(methodName),
|
||||
"Method already defined: %s", methodName);
|
||||
fileDescriptorsBySymbol.put(methodName, fd);
|
||||
}
|
||||
}
|
||||
|
||||
private void processType(Descriptor type, FileDescriptor fd) {
|
||||
String typeName = type.getFullName();
|
||||
Preconditions.checkState(!fileDescriptorsBySymbol.containsKey(typeName),
|
||||
"Type already defined: %s", typeName);
|
||||
fileDescriptorsBySymbol.put(typeName, fd);
|
||||
for (FieldDescriptor extension : type.getExtensions()) {
|
||||
processExtension(extension, fd);
|
||||
}
|
||||
for (Descriptor nestedType : type.getNestedTypes()) {
|
||||
processType(nestedType, fd);
|
||||
}
|
||||
}
|
||||
|
||||
private void processFileDescriptor(FileDescriptor fd) {
|
||||
String fdName = fd.getName();
|
||||
Preconditions.checkState(!fileDescriptorsByName.containsKey(fdName),
|
||||
"File name already used: %s", fdName);
|
||||
fileDescriptorsByName.put(fdName, fd);
|
||||
for (ServiceDescriptor service : fd.getServices()) {
|
||||
processService(service, fd);
|
||||
}
|
||||
for (Descriptor type : fd.getMessageTypes()) {
|
||||
processType(type, fd);
|
||||
}
|
||||
for (FieldDescriptor extension : fd.getExtensions()) {
|
||||
processExtension(extension, fd);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Processes the service file descriptors. This prepares a list of the service names and
|
||||
* indexes the file descriptors by name, symbol, and extension.
|
||||
*/
|
||||
private void initFileDescriptorMaps() {
|
||||
serviceNames = new HashSet<String>();
|
||||
fileDescriptorsByName = new HashMap<String, FileDescriptor>();
|
||||
fileDescriptorsBySymbol = new HashMap<String, FileDescriptor>();
|
||||
fileDescriptorsByExtensionAndNumber = new HashMap<String, Map<Integer, FileDescriptor>>();
|
||||
|
||||
List<ServerServiceDefinition> services = server.getServices();
|
||||
|
||||
Queue<FileDescriptor> fileDescriptorsToProcess = new LinkedList<FileDescriptor>();
|
||||
Set<String> seenFiles = new HashSet<String>();
|
||||
for (ServerServiceDefinition service : services) {
|
||||
io.grpc.ServiceDescriptor serviceDescriptor = service.getServiceDescriptor();
|
||||
if (serviceDescriptor.getMarshallerDescriptor() instanceof ProtoFileDescriptorSupplier) {
|
||||
FileDescriptor fileDescriptor =
|
||||
((ProtoFileDescriptorSupplier) serviceDescriptor.getMarshallerDescriptor())
|
||||
.getFileDescriptor();
|
||||
String serviceName = serviceDescriptor.getName();
|
||||
Preconditions.checkState(!serviceNames.contains(serviceName),
|
||||
"Service already defined: %s", serviceName);
|
||||
serviceNames.add(serviceName);
|
||||
if (!seenFiles.contains(fileDescriptor.getName())) {
|
||||
seenFiles.add(fileDescriptor.getName());
|
||||
fileDescriptorsToProcess.add(fileDescriptor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
while (!fileDescriptorsToProcess.isEmpty()) {
|
||||
FileDescriptor currentFd = fileDescriptorsToProcess.remove();
|
||||
processFileDescriptor(currentFd);
|
||||
for (FileDescriptor dependencyFd : currentFd.getDependencies()) {
|
||||
if (!seenFiles.contains(dependencyFd.getName())) {
|
||||
seenFiles.add(dependencyFd.getName());
|
||||
fileDescriptorsToProcess.add(dependencyFd);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(ServerReflectionRequest request) {
|
||||
initFileDescriptorMaps();
|
||||
switch (request.getMessageRequestCase()) {
|
||||
case FILE_BY_FILENAME:
|
||||
getFileByName(request);
|
||||
return;
|
||||
case FILE_CONTAINING_SYMBOL:
|
||||
getFileContainingSymbol(request);
|
||||
return;
|
||||
case FILE_CONTAINING_EXTENSION:
|
||||
getFileByExtension(request);
|
||||
return;
|
||||
case ALL_EXTENSION_NUMBERS_OF_TYPE:
|
||||
getAllExtensions(request);
|
||||
return;
|
||||
case LIST_SERVICES:
|
||||
listServices(request);
|
||||
return;
|
||||
default:
|
||||
sendErrorResponse(request, Status.UNIMPLEMENTED, "");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCompleted() {
|
||||
responseObserver.onCompleted();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable cause) {
|
||||
responseObserver.onError(cause);
|
||||
}
|
||||
|
||||
private void getFileByName(ServerReflectionRequest request) {
|
||||
String name = request.getFileByFilename();
|
||||
FileDescriptor fd = fileDescriptorsByName.get(name);
|
||||
if (fd != null) {
|
||||
responseObserver.onNext(createServerReflectionResponse(request, fd));
|
||||
} else {
|
||||
sendErrorResponse(request, Status.NOT_FOUND, "File not found.");
|
||||
}
|
||||
}
|
||||
|
||||
private void getFileContainingSymbol(ServerReflectionRequest request) {
|
||||
String symbol = request.getFileContainingSymbol();
|
||||
if (fileDescriptorsBySymbol.containsKey(symbol)) {
|
||||
FileDescriptor fd = fileDescriptorsBySymbol.get(symbol);
|
||||
responseObserver.onNext(createServerReflectionResponse(request, fd));
|
||||
return;
|
||||
}
|
||||
sendErrorResponse(request, Status.NOT_FOUND, "Symbol not found.");
|
||||
}
|
||||
|
||||
private void getFileByExtension(ServerReflectionRequest request) {
|
||||
ExtensionRequest ext = request.getFileContainingExtension();
|
||||
String containingType = ext.getContainingType();
|
||||
int extensionNumber = ext.getExtensionNumber();
|
||||
if (fileDescriptorsByExtensionAndNumber.containsKey(containingType)
|
||||
&& fileDescriptorsByExtensionAndNumber
|
||||
.get(containingType)
|
||||
.containsKey(extensionNumber)) {
|
||||
responseObserver.onNext(
|
||||
createServerReflectionResponse(
|
||||
request,
|
||||
fileDescriptorsByExtensionAndNumber.get(containingType).get(extensionNumber)));
|
||||
} else {
|
||||
sendErrorResponse(request, Status.NOT_FOUND, "Extension not found.");
|
||||
}
|
||||
}
|
||||
|
||||
private void getAllExtensions(ServerReflectionRequest request) {
|
||||
String type = request.getAllExtensionNumbersOfType();
|
||||
ExtensionNumberResponse.Builder builder =
|
||||
ExtensionNumberResponse.newBuilder().setBaseTypeName(type);
|
||||
if (fileDescriptorsByExtensionAndNumber.containsKey(type)) {
|
||||
for (int extensionNumber : fileDescriptorsByExtensionAndNumber.get(type).keySet()) {
|
||||
builder.addExtensionNumber(extensionNumber);
|
||||
}
|
||||
responseObserver.onNext(
|
||||
ServerReflectionResponse.newBuilder()
|
||||
.setValidHost(request.getHost())
|
||||
.setOriginalRequest(request)
|
||||
.setAllExtensionNumbersResponse(builder)
|
||||
.build());
|
||||
} else {
|
||||
sendErrorResponse(request, Status.NOT_FOUND, "Type not found.");
|
||||
}
|
||||
}
|
||||
|
||||
private void listServices(ServerReflectionRequest request) {
|
||||
ListServiceResponse.Builder builder = ListServiceResponse.newBuilder();
|
||||
for (String serviceName : serviceNames) {
|
||||
builder.addService(ServiceResponse.newBuilder().setName(serviceName));
|
||||
}
|
||||
responseObserver.onNext(
|
||||
ServerReflectionResponse.newBuilder()
|
||||
.setValidHost(request.getHost())
|
||||
.setOriginalRequest(request)
|
||||
.setListServicesResponse(builder)
|
||||
.build());
|
||||
}
|
||||
|
||||
private void sendErrorResponse(
|
||||
ServerReflectionRequest request, Status status, String message) {
|
||||
ServerReflectionResponse response =
|
||||
ServerReflectionResponse.newBuilder()
|
||||
.setValidHost(request.getHost())
|
||||
.setOriginalRequest(request)
|
||||
.setErrorResponse(
|
||||
ErrorResponse.newBuilder()
|
||||
.setErrorCode(status.getCode().value())
|
||||
.setErrorMessage(message))
|
||||
.build();
|
||||
responseObserver.onNext(response);
|
||||
}
|
||||
|
||||
private ServerReflectionResponse createServerReflectionResponse(
|
||||
ServerReflectionRequest request, FileDescriptor fd) {
|
||||
FileDescriptorResponse.Builder fdRBuilder = FileDescriptorResponse.newBuilder();
|
||||
|
||||
Set<String> seenFiles = new HashSet<String>();
|
||||
Queue<FileDescriptor> frontier = new LinkedList<FileDescriptor>();
|
||||
seenFiles.add(fd.getName());
|
||||
frontier.add(fd);
|
||||
while (!frontier.isEmpty()) {
|
||||
FileDescriptor nextFd = frontier.remove();
|
||||
fdRBuilder.addFileDescriptorProto(nextFd.toProto().toByteString());
|
||||
for (FileDescriptor dependencyFd : nextFd.getDependencies()) {
|
||||
if (!seenFiles.contains(dependencyFd.getName())) {
|
||||
seenFiles.add(dependencyFd.getName());
|
||||
frontier.add(dependencyFd);
|
||||
}
|
||||
}
|
||||
}
|
||||
return ServerReflectionResponse.newBuilder()
|
||||
.setValidHost(request.getHost())
|
||||
.setOriginalRequest(request)
|
||||
.setFileDescriptorResponse(fdRBuilder)
|
||||
.build();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,155 @@
|
|||
// Copyright 2016, Google Inc.
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
// Service exported by server reflection
|
||||
|
||||
syntax = "proto3";
|
||||
|
||||
package grpc.reflection.v1alpha;
|
||||
|
||||
option java_multiple_files = true;
|
||||
option java_package = "io.grpc.reflection.v1alpha";
|
||||
option java_outer_classname = "ServerReflectionProto";
|
||||
|
||||
service ServerReflection {
|
||||
// The reflection service is structured as a bidirectional stream, ensuring
|
||||
// all related requests go to a single server.
|
||||
rpc ServerReflectionInfo(stream ServerReflectionRequest)
|
||||
returns (stream ServerReflectionResponse);
|
||||
}
|
||||
|
||||
// The message sent by the client when calling ServerReflectionInfo method.
|
||||
message ServerReflectionRequest {
|
||||
string host = 1;
|
||||
// To use reflection service, the client should set one of the following
|
||||
// fields in message_request. The server distinguishes requests by their
|
||||
// defined field and then handles them using corresponding methods.
|
||||
oneof message_request {
|
||||
// Find a proto file by the file name.
|
||||
string file_by_filename = 3;
|
||||
|
||||
// Find the proto file that declares the given fully-qualified symbol name.
|
||||
// This field should be a fully-qualified symbol name
|
||||
// (e.g. <package>.<service>[.<method>] or <package>.<type>).
|
||||
string file_containing_symbol = 4;
|
||||
|
||||
// Find the proto file which defines an extension extending the given
|
||||
// message type with the given field number.
|
||||
ExtensionRequest file_containing_extension = 5;
|
||||
|
||||
// Finds the tag numbers used by all known extensions of extendee_type, and
|
||||
// appends them to ExtensionNumberResponse in an undefined order.
|
||||
// Its corresponding method is best-effort: it's not guaranteed that the
|
||||
// reflection service will implement this method, and it's not guaranteed
|
||||
// that this method will provide all extensions. Returns
|
||||
// StatusCode::UNIMPLEMENTED if it's not implemented.
|
||||
// This field should be a fully-qualified type name. The format is
|
||||
// <package>.<type>
|
||||
string all_extension_numbers_of_type = 6;
|
||||
|
||||
// List the full names of registered services. The content will not be
|
||||
// checked.
|
||||
string list_services = 7;
|
||||
}
|
||||
}
|
||||
|
||||
// The type name and extension number sent by the client when requesting
|
||||
// file_containing_extension.
|
||||
message ExtensionRequest {
|
||||
// Fully-qualified type name. The format should be <package>.<type>
|
||||
string containing_type = 1;
|
||||
int32 extension_number = 2;
|
||||
}
|
||||
|
||||
// The message sent by the server to answer ServerReflectionInfo method.
|
||||
message ServerReflectionResponse {
|
||||
string valid_host = 1;
|
||||
ServerReflectionRequest original_request = 2;
|
||||
// The server set one of the following fields accroding to the message_request
|
||||
// in the request.
|
||||
oneof message_response {
|
||||
// This message is used to answer file_by_filename, file_containing_symbol,
|
||||
// file_containing_extension requests with transitive dependencies. As
|
||||
// the repeated label is not allowed in oneof fields, we use a
|
||||
// FileDescriptorResponse message to encapsulate the repeated fields.
|
||||
// The reflection service is allowed to avoid sending FileDescriptorProtos
|
||||
// that were previously sent in response to earlier requests in the stream.
|
||||
FileDescriptorResponse file_descriptor_response = 4;
|
||||
|
||||
// This message is used to answer all_extension_numbers_of_type requst.
|
||||
ExtensionNumberResponse all_extension_numbers_response = 5;
|
||||
|
||||
// This message is used to answer list_services request.
|
||||
ListServiceResponse list_services_response = 6;
|
||||
|
||||
// This message is used when an error occurs.
|
||||
ErrorResponse error_response = 7;
|
||||
}
|
||||
}
|
||||
|
||||
// Serialized FileDescriptorProto messages sent by the server answering
|
||||
// a file_by_filename, file_containing_symbol, or file_containing_extension
|
||||
// request.
|
||||
message FileDescriptorResponse {
|
||||
// Serialized FileDescriptorProto messages. We avoid taking a dependency on
|
||||
// descriptor.proto, which uses proto2 only features, by making them opaque
|
||||
// bytes instead.
|
||||
repeated bytes file_descriptor_proto = 1;
|
||||
}
|
||||
|
||||
// A list of extension numbers sent by the server answering
|
||||
// all_extension_numbers_of_type request.
|
||||
message ExtensionNumberResponse {
|
||||
// Full name of the base type, including the package name. The format
|
||||
// is <package>.<type>
|
||||
string base_type_name = 1;
|
||||
repeated int32 extension_number = 2;
|
||||
}
|
||||
|
||||
// A list of ServiceResponse sent by the server answering list_services request.
|
||||
message ListServiceResponse {
|
||||
// The information of each service may be expanded in the future, so we use
|
||||
// ServiceResponse message to encapsulate it.
|
||||
repeated ServiceResponse service = 1;
|
||||
}
|
||||
|
||||
// The information of a single service used by ListServiceResponse to answer
|
||||
// list_services request.
|
||||
message ServiceResponse {
|
||||
// Full name of a registered service, including its package name. The format
|
||||
// is <package>.<service>
|
||||
string name = 1;
|
||||
}
|
||||
|
||||
// The error code and error message sent by the server when an error occurs.
|
||||
message ErrorResponse {
|
||||
// This field uses the error codes defined in grpc::StatusCode.
|
||||
int32 error_code = 1;
|
||||
string error_message = 2;
|
||||
}
|
||||
|
|
@ -0,0 +1,312 @@
|
|||
/*
|
||||
* Copyright 2016, Google Inc. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
* met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above
|
||||
* copyright notice, this list of conditions and the following disclaimer
|
||||
* in the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
*
|
||||
* * Neither the name of Google Inc. nor the names of its
|
||||
* contributors may be used to endorse or promote products derived from
|
||||
* this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package io.grpc.protobuf.service;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
import com.google.protobuf.ByteString;
|
||||
|
||||
import io.grpc.ServerServiceDefinition;
|
||||
import io.grpc.inprocess.InProcessServerBuilder;
|
||||
import io.grpc.internal.ServerImpl;
|
||||
import io.grpc.reflection.testing.DynamicServiceGrpc;
|
||||
import io.grpc.reflection.testing.ReflectableServiceGrpc;
|
||||
import io.grpc.reflection.testing.ReflectionTestDepthThreeProto;
|
||||
import io.grpc.reflection.testing.ReflectionTestDepthTwoAlternateProto;
|
||||
import io.grpc.reflection.testing.ReflectionTestDepthTwoProto;
|
||||
import io.grpc.reflection.testing.ReflectionTestProto;
|
||||
import io.grpc.reflection.v1alpha.ExtensionRequest;
|
||||
import io.grpc.reflection.v1alpha.FileDescriptorResponse;
|
||||
import io.grpc.reflection.v1alpha.ServerReflectionRequest;
|
||||
import io.grpc.reflection.v1alpha.ServerReflectionResponse;
|
||||
import io.grpc.reflection.v1alpha.ServiceResponse;
|
||||
import io.grpc.stub.StreamObserver;
|
||||
import io.grpc.testing.StreamRecorder;
|
||||
import io.grpc.util.MutableHandlerRegistry;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.JUnit4;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* Tests for {@link ProtoReflectionService}.
|
||||
*/
|
||||
@RunWith(JUnit4.class)
|
||||
public class ProtoReflectionServiceTest {
|
||||
|
||||
private static final String TEST_HOST = "localhost";
|
||||
|
||||
private MutableHandlerRegistry handlerRegistry = new MutableHandlerRegistry();
|
||||
|
||||
private ProtoReflectionService reflectionService;
|
||||
|
||||
private ServerImpl server;
|
||||
|
||||
@Before
|
||||
public void setUp() throws IOException {
|
||||
reflectionService = new ProtoReflectionService();
|
||||
server = InProcessServerBuilder.forName("proto-reflection-test")
|
||||
.addService(reflectionService)
|
||||
.addService(new ReflectableServiceGrpc.ReflectableServiceImplBase() {})
|
||||
.fallbackHandlerRegistry(handlerRegistry)
|
||||
.build();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void listServices() throws Exception {
|
||||
Set<ServiceResponse> originalServices = new HashSet<ServiceResponse>(
|
||||
Arrays.asList(
|
||||
ServiceResponse.newBuilder()
|
||||
.setName("grpc.reflection.v1alpha.ServerReflection")
|
||||
.build(),
|
||||
ServiceResponse.newBuilder()
|
||||
.setName("grpc.reflection.testing.ReflectableService")
|
||||
.build())
|
||||
);
|
||||
assertServiceResponseEquals(originalServices);
|
||||
|
||||
ServerServiceDefinition dynamicService =
|
||||
(new DynamicServiceGrpc.DynamicServiceImplBase() {}).bindService();
|
||||
handlerRegistry.addService(dynamicService);
|
||||
assertServiceResponseEquals(new HashSet<ServiceResponse>(
|
||||
Arrays.asList(
|
||||
ServiceResponse.newBuilder()
|
||||
.setName("grpc.reflection.v1alpha.ServerReflection")
|
||||
.build(),
|
||||
ServiceResponse.newBuilder()
|
||||
.setName("grpc.reflection.testing.ReflectableService")
|
||||
.build(),
|
||||
ServiceResponse.newBuilder()
|
||||
.setName("grpc.reflection.testing.DynamicService")
|
||||
.build())
|
||||
));
|
||||
|
||||
handlerRegistry.removeService(dynamicService);
|
||||
assertServiceResponseEquals(originalServices);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void fileByFilename() throws Exception {
|
||||
ServerReflectionRequest request =
|
||||
ServerReflectionRequest.newBuilder()
|
||||
.setHost(TEST_HOST)
|
||||
.setFileByFilename("io/grpc/reflection/testing/reflection_test_depth_three.proto")
|
||||
.build();
|
||||
|
||||
ServerReflectionResponse goldenResponse =
|
||||
ServerReflectionResponse.newBuilder()
|
||||
.setValidHost(TEST_HOST)
|
||||
.setOriginalRequest(request)
|
||||
.setFileDescriptorResponse(
|
||||
FileDescriptorResponse.newBuilder()
|
||||
.addFileDescriptorProto(
|
||||
ReflectionTestDepthThreeProto.getDescriptor().toProto().toByteString())
|
||||
.build())
|
||||
.build();
|
||||
|
||||
StreamRecorder<ServerReflectionResponse> responseObserver = StreamRecorder.create();
|
||||
StreamObserver<ServerReflectionRequest> requestObserver =
|
||||
reflectionService.serverReflectionInfo(responseObserver);
|
||||
requestObserver.onNext(request);
|
||||
requestObserver.onCompleted();
|
||||
assertEquals(goldenResponse, responseObserver.firstValue().get());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void fileContainingSymbol() throws Exception {
|
||||
ServerReflectionRequest request =
|
||||
ServerReflectionRequest.newBuilder()
|
||||
.setHost(TEST_HOST)
|
||||
.setFileContainingSymbol("grpc.reflection.testing.ReflectableService.Method")
|
||||
.build();
|
||||
|
||||
List<ByteString> goldenResponse =
|
||||
Arrays.asList(
|
||||
ReflectionTestProto.getDescriptor().toProto().toByteString(),
|
||||
ReflectionTestDepthTwoProto.getDescriptor().toProto().toByteString(),
|
||||
ReflectionTestDepthTwoAlternateProto.getDescriptor().toProto().toByteString(),
|
||||
ReflectionTestDepthThreeProto.getDescriptor().toProto().toByteString()
|
||||
);
|
||||
|
||||
StreamRecorder<ServerReflectionResponse> responseObserver = StreamRecorder.create();
|
||||
StreamObserver<ServerReflectionRequest> requestObserver =
|
||||
reflectionService.serverReflectionInfo(responseObserver);
|
||||
requestObserver.onNext(request);
|
||||
requestObserver.onCompleted();
|
||||
|
||||
List<ByteString> response =
|
||||
responseObserver.firstValue().get()
|
||||
.getFileDescriptorResponse().getFileDescriptorProtoList();
|
||||
assertEquals(goldenResponse.size(), response.size());
|
||||
assertEquals(new HashSet<ByteString>(goldenResponse), new HashSet<ByteString>(response));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void fileContainingNestedSymbol() throws Exception {
|
||||
ServerReflectionRequest request =
|
||||
ServerReflectionRequest.newBuilder()
|
||||
.setHost(TEST_HOST)
|
||||
.setFileContainingSymbol("grpc.reflection.testing.NestedTypeOuter.Middle.Inner")
|
||||
.build();
|
||||
|
||||
ServerReflectionResponse goldenResponse =
|
||||
ServerReflectionResponse.newBuilder()
|
||||
.setValidHost(TEST_HOST)
|
||||
.setOriginalRequest(request)
|
||||
.setFileDescriptorResponse(
|
||||
FileDescriptorResponse.newBuilder()
|
||||
.addFileDescriptorProto(
|
||||
ReflectionTestDepthThreeProto.getDescriptor().toProto().toByteString())
|
||||
.build())
|
||||
.build();
|
||||
|
||||
StreamRecorder<ServerReflectionResponse> responseObserver = StreamRecorder.create();
|
||||
StreamObserver<ServerReflectionRequest> requestObserver =
|
||||
reflectionService.serverReflectionInfo(responseObserver);
|
||||
requestObserver.onNext(request);
|
||||
requestObserver.onCompleted();
|
||||
assertEquals(goldenResponse, responseObserver.firstValue().get());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void fileContainingExtension() throws Exception {
|
||||
ServerReflectionRequest request =
|
||||
ServerReflectionRequest.newBuilder()
|
||||
.setHost(TEST_HOST)
|
||||
.setFileContainingExtension(
|
||||
ExtensionRequest.newBuilder()
|
||||
.setContainingType("grpc.reflection.testing.ThirdLevelType")
|
||||
.setExtensionNumber(100)
|
||||
.build())
|
||||
.build();
|
||||
|
||||
List<ByteString> goldenResponse =
|
||||
Arrays.asList(
|
||||
ReflectionTestProto.getDescriptor().toProto().toByteString(),
|
||||
ReflectionTestDepthTwoProto.getDescriptor().toProto().toByteString(),
|
||||
ReflectionTestDepthTwoAlternateProto.getDescriptor().toProto().toByteString(),
|
||||
ReflectionTestDepthThreeProto.getDescriptor().toProto().toByteString()
|
||||
);
|
||||
|
||||
StreamRecorder<ServerReflectionResponse> responseObserver = StreamRecorder.create();
|
||||
StreamObserver<ServerReflectionRequest> requestObserver =
|
||||
reflectionService.serverReflectionInfo(responseObserver);
|
||||
requestObserver.onNext(request);
|
||||
requestObserver.onCompleted();
|
||||
|
||||
List<ByteString> response =
|
||||
responseObserver.firstValue().get()
|
||||
.getFileDescriptorResponse().getFileDescriptorProtoList();
|
||||
assertEquals(goldenResponse.size(), response.size());
|
||||
assertEquals(new HashSet<ByteString>(goldenResponse), new HashSet<ByteString>(response));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void fileContainingNestedExtension() throws Exception {
|
||||
ServerReflectionRequest request =
|
||||
ServerReflectionRequest.newBuilder()
|
||||
.setHost(TEST_HOST)
|
||||
.setFileContainingExtension(
|
||||
ExtensionRequest.newBuilder()
|
||||
.setContainingType("grpc.reflection.testing.ThirdLevelType")
|
||||
.setExtensionNumber(101)
|
||||
.build())
|
||||
.build();
|
||||
|
||||
ServerReflectionResponse goldenResponse =
|
||||
ServerReflectionResponse.newBuilder()
|
||||
.setValidHost(TEST_HOST)
|
||||
.setOriginalRequest(request)
|
||||
.setFileDescriptorResponse(
|
||||
FileDescriptorResponse.newBuilder()
|
||||
.addFileDescriptorProto(
|
||||
ReflectionTestDepthTwoProto.getDescriptor().toProto().toByteString())
|
||||
.addFileDescriptorProto(
|
||||
ReflectionTestDepthThreeProto.getDescriptor().toProto().toByteString())
|
||||
.build())
|
||||
.build();
|
||||
|
||||
StreamRecorder<ServerReflectionResponse> responseObserver = StreamRecorder.create();
|
||||
StreamObserver<ServerReflectionRequest> requestObserver =
|
||||
reflectionService.serverReflectionInfo(responseObserver);
|
||||
requestObserver.onNext(request);
|
||||
requestObserver.onCompleted();
|
||||
assertEquals(goldenResponse, responseObserver.firstValue().get());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void allExtensionNumbersOfType() throws Exception {
|
||||
ServerReflectionRequest request =
|
||||
ServerReflectionRequest.newBuilder()
|
||||
.setHost(TEST_HOST)
|
||||
.setAllExtensionNumbersOfType("grpc.reflection.testing.ThirdLevelType")
|
||||
.build();
|
||||
|
||||
Set<Integer> goldenResponse = new HashSet<Integer>(Arrays.asList(100, 101));
|
||||
|
||||
StreamRecorder<ServerReflectionResponse> responseObserver = StreamRecorder.create();
|
||||
StreamObserver<ServerReflectionRequest> requestObserver =
|
||||
reflectionService.serverReflectionInfo(responseObserver);
|
||||
requestObserver.onNext(request);
|
||||
requestObserver.onCompleted();
|
||||
Set<Integer> extensionNumberResponseSet =
|
||||
new HashSet<Integer>(
|
||||
responseObserver
|
||||
.firstValue()
|
||||
.get()
|
||||
.getAllExtensionNumbersResponse()
|
||||
.getExtensionNumberList());
|
||||
assertEquals(goldenResponse, extensionNumberResponseSet);
|
||||
}
|
||||
|
||||
|
||||
private void assertServiceResponseEquals(Set<ServiceResponse> goldenResponse) throws Exception {
|
||||
ServerReflectionRequest request =
|
||||
ServerReflectionRequest.newBuilder().setHost(TEST_HOST).setListServices("services").build();
|
||||
StreamRecorder<ServerReflectionResponse> responseObserver = StreamRecorder.create();
|
||||
StreamObserver<ServerReflectionRequest> requestObserver =
|
||||
reflectionService.serverReflectionInfo(responseObserver);
|
||||
requestObserver.onNext(request);
|
||||
requestObserver.onCompleted();
|
||||
List<ServiceResponse> response =
|
||||
responseObserver.firstValue().get().getListServicesResponse().getServiceList();
|
||||
assertEquals(goldenResponse.size(), response.size());
|
||||
assertEquals(goldenResponse, new HashSet<ServiceResponse>(response));
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,54 @@
|
|||
// Copyright 2016, Google Inc.
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
// Service definition designed to test the ProtoReflectionService. It contains
|
||||
// nested types, extensions, and multiple levels of imports.
|
||||
|
||||
syntax = "proto2";
|
||||
|
||||
import "io/grpc/reflection/testing/reflection_test_depth_two.proto";
|
||||
import "io/grpc/reflection/testing/reflection_test_depth_two_alternate.proto";
|
||||
|
||||
option java_multiple_files = true;
|
||||
option java_package = "io.grpc.reflection.testing";
|
||||
option java_outer_classname = "ReflectionTestProto";
|
||||
|
||||
package grpc.reflection.testing;
|
||||
|
||||
extend ThirdLevelType {
|
||||
optional int32 bar = 100;
|
||||
}
|
||||
|
||||
service ReflectableService {
|
||||
rpc Method (Request) returns (Reply) {}
|
||||
}
|
||||
|
||||
service DynamicService {
|
||||
rpc Method (Request) returns (Reply) {}
|
||||
}
|
||||
|
|
@ -0,0 +1,53 @@
|
|||
// Copyright 2016, Google Inc.
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
// Part of the service definition designed to test the ProtoReflectionService.
|
||||
|
||||
syntax = "proto2";
|
||||
|
||||
option java_multiple_files = true;
|
||||
option java_package = "io.grpc.reflection.testing";
|
||||
option java_outer_classname = "ReflectionTestDepthThreeProto";
|
||||
|
||||
package grpc.reflection.testing;
|
||||
|
||||
message EmptyMessage {}
|
||||
|
||||
message ThirdLevelType {
|
||||
required string message = 1;
|
||||
extensions 100 to 199;
|
||||
}
|
||||
|
||||
message NestedTypeOuter {
|
||||
message Middle {
|
||||
message Inner {
|
||||
required int32 ival = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
// Copyright 2016, Google Inc.
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
// Part of the service definition designed to test the ProtoReflectionService.
|
||||
|
||||
syntax = "proto2";
|
||||
|
||||
import public "io/grpc/reflection/testing/reflection_test_depth_three.proto";
|
||||
|
||||
option java_multiple_files = true;
|
||||
option java_package = "io.grpc.reflection.testing";
|
||||
option java_outer_classname = "ReflectionTestDepthTwoProto";
|
||||
|
||||
package grpc.reflection.testing;
|
||||
|
||||
message Request {
|
||||
required string message = 1;
|
||||
}
|
||||
|
||||
message Reply {
|
||||
required string message = 1;
|
||||
}
|
||||
|
||||
extend ThirdLevelType {
|
||||
optional EmptyMessage nested_extension = 101;
|
||||
}
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
// Copyright 2016, Google Inc.
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
// Provides an alternate dependency path to reflection_test_depth_three.proto,
|
||||
// to test that the reflection service only returns dependencies once.
|
||||
|
||||
syntax = "proto2";
|
||||
|
||||
import public "io/grpc/reflection/testing/reflection_test_depth_three.proto";
|
||||
|
||||
option java_multiple_files = true;
|
||||
option java_package = "io.grpc.reflection.testing";
|
||||
option java_outer_classname = "ReflectionTestDepthTwoAlternateProto";
|
||||
Loading…
Reference in New Issue