#include "src/compiler/java_generator.h"
#include <algorithm>
#include <iostream>
#include <iterator>
#include <map>
#include <utility>
#include <vector>
#include "flatbuffers/util.h"
#define to_string …
#ifndef STR
#define STR(s) …
#endif
#ifndef XSTR
#define XSTR(s) …
#endif
Printer;
VARS;
ServiceDescriptor;
DescriptorType;
MethodDescriptor;
namespace grpc_java_generator {
string;
namespace {
static void GenerateImports(grpc_generator::File *file,
grpc_generator::Printer *printer, VARS &vars) { … }
static string MixedLower(const string &word) { … }
static string ToAllUpperCase(const string &word) { … }
static inline string LowerMethodName(const MethodDescriptor *method) { … }
static inline string MethodPropertiesFieldName(const MethodDescriptor *method) { … }
static inline string MethodPropertiesGetterName(
const MethodDescriptor *method) { … }
static inline string MethodIdFieldName(const MethodDescriptor *method) { … }
static inline string JavaClassName(VARS &vars, const string &name) { … }
static inline string ServiceClassName(const string &service_name) { … }
template<typename ITR>
static void GrpcSplitStringToIteratorUsing(const string &full,
const char *delim, ITR &result) { … }
static void GrpcSplitStringUsing(const string &full, const char *delim,
std::vector<string> *result) { … }
static std::vector<string> GrpcSplit(const string &full, const char *delim) { … }
static string GrpcEscapeJavadoc(const string &input) { … }
static std::vector<string> GrpcGetDocLines(const string &comments) { … }
static std::vector<string> GrpcGetDocLinesForDescriptor(
const DescriptorType *descriptor) { … }
static void GrpcWriteDocCommentBody(Printer *printer, VARS &vars,
const std::vector<string> &lines,
bool surroundWithPreTag) { … }
static void GrpcWriteDocComment(Printer *printer, VARS &vars,
const string &comments) { … }
static void GrpcWriteServiceDocComment(Printer *printer, VARS &vars,
const ServiceDescriptor *service) { … }
static void GrpcWriteMethodDocComment(Printer *printer, VARS &vars,
const MethodDescriptor *method) { … }
static void PrintTypeExtractor(Printer *p, VARS &vars) { … }
static void PrintMethodFields(Printer *p, VARS &vars,
const ServiceDescriptor *service) { … }
enum StubType { … };
enum CallType { … };
static void PrintBindServiceMethodBody(Printer *p, VARS &vars,
const ServiceDescriptor *service);
static void PrintStub(Printer *p, VARS &vars, const ServiceDescriptor *service,
StubType type) { … }
static bool CompareMethodClientStreaming(
const std::unique_ptr<const grpc_generator::Method> &method1,
const std::unique_ptr<const grpc_generator::Method> &method2) { … }
static void PrintMethodHandlerClass(Printer *p, VARS &vars,
const ServiceDescriptor *service) { … }
static void PrintGetServiceDescriptorMethod(Printer *p, VARS &vars,
const ServiceDescriptor *service) { … }
static void PrintBindServiceMethodBody(Printer *p, VARS &vars,
const ServiceDescriptor *service) { … }
static void PrintService(Printer *p, VARS &vars,
const ServiceDescriptor *service,
bool disable_version) { … }
static void PrintStaticImports(Printer *p) { … }
static void GenerateService(const grpc_generator::Service *service,
grpc_generator::Printer *printer, VARS &vars,
bool disable_version) { … }
}
grpc::string GenerateServiceSource(
grpc_generator::File *file, const grpc_generator::Service *service,
grpc_java_generator::Parameters *parameters) { … }
}