| Index: third_party/protobuf/src/google/protobuf/compiler/java/java_names.h
|
| diff --git a/third_party/protobuf/src/google/protobuf/compiler/java/java_generator.h b/third_party/protobuf/src/google/protobuf/compiler/java/java_names.h
|
| similarity index 66%
|
| copy from third_party/protobuf/src/google/protobuf/compiler/java/java_generator.h
|
| copy to third_party/protobuf/src/google/protobuf/compiler/java/java_names.h
|
| index 888b8d85e929d3cab46ed24fe25ef24f906457b4..0d6143353a0006ce18c760a57036346e17ca429e 100644
|
| --- a/third_party/protobuf/src/google/protobuf/compiler/java/java_generator.h
|
| +++ b/third_party/protobuf/src/google/protobuf/compiler/java/java_names.h
|
| @@ -1,6 +1,6 @@
|
| // Protocol Buffers - Google's data interchange format
|
| // Copyright 2008 Google Inc. All rights reserved.
|
| -// http://code.google.com/p/protobuf/
|
| +// https://developers.google.com/protocol-buffers/
|
| //
|
| // Redistribution and use in source and binary forms, with or without
|
| // modification, are permitted provided that the following conditions are
|
| @@ -32,41 +32,56 @@
|
| // Based on original Protocol Buffers design by
|
| // Sanjay Ghemawat, Jeff Dean, and others.
|
| //
|
| -// Generates Java code for a given .proto file.
|
| +// Provides a mechanism for mapping a descriptor to the
|
| +// fully-qualified name of the corresponding Java class.
|
|
|
| -#ifndef GOOGLE_PROTOBUF_COMPILER_JAVA_GENERATOR_H__
|
| -#define GOOGLE_PROTOBUF_COMPILER_JAVA_GENERATOR_H__
|
| +#ifndef GOOGLE_PROTOBUF_COMPILER_JAVA_NAMES_H__
|
| +#define GOOGLE_PROTOBUF_COMPILER_JAVA_NAMES_H__
|
|
|
| #include <string>
|
| -#include <google/protobuf/compiler/code_generator.h>
|
|
|
| namespace google {
|
| namespace protobuf {
|
| +
|
| +class Descriptor;
|
| +class EnumDescriptor;
|
| +class FileDescriptor;
|
| +class ServiceDescriptor;
|
| +
|
| namespace compiler {
|
| namespace java {
|
|
|
| -// CodeGenerator implementation which generates Java code. If you create your
|
| -// own protocol compiler binary and you want it to support Java output, you
|
| -// can do so by registering an instance of this CodeGenerator with the
|
| -// CommandLineInterface in your main() function.
|
| -class LIBPROTOC_EXPORT JavaGenerator : public CodeGenerator {
|
| - public:
|
| - JavaGenerator();
|
| - ~JavaGenerator();
|
| +// Requires:
|
| +// descriptor != NULL
|
| +//
|
| +// Returns:
|
| +// The fully-qualified Java class name.
|
| +string ClassName(const Descriptor* descriptor);
|
|
|
| - // implements CodeGenerator ----------------------------------------
|
| - bool Generate(const FileDescriptor* file,
|
| - const string& parameter,
|
| - GeneratorContext* context,
|
| - string* error) const;
|
| +// Requires:
|
| +// descriptor != NULL
|
| +//
|
| +// Returns:
|
| +// The fully-qualified Java class name.
|
| +string ClassName(const EnumDescriptor* descriptor);
|
|
|
| - private:
|
| - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(JavaGenerator);
|
| -};
|
| +// Requires:
|
| +// descriptor != NULL
|
| +//
|
| +// Returns:
|
| +// The fully-qualified Java class name.
|
| +string ClassName(const FileDescriptor* descriptor);
|
| +
|
| +// Requires:
|
| +// descriptor != NULL
|
| +//
|
| +// Returns:
|
| +// The fully-qualified Java class name.
|
| +string ClassName(const ServiceDescriptor* descriptor);
|
|
|
| } // namespace java
|
| } // namespace compiler
|
| } // namespace protobuf
|
| -
|
| } // namespace google
|
| -#endif // GOOGLE_PROTOBUF_COMPILER_JAVA_GENERATOR_H__
|
| +
|
| +#endif // GOOGLE_PROTOBUF_COMPILER_JAVA_NAMES_H__
|
|
|