| Index: third_party/protobuf/src/google/protobuf/compiler/java/java_file.h
|
| diff --git a/third_party/protobuf/src/google/protobuf/compiler/java/java_file.h b/third_party/protobuf/src/google/protobuf/compiler/java/java_file.h
|
| index 080b342412ee8e99ccdadb363ae671b31f55cb7b..59911462668d56811f2bcc762a5556431c36b32e 100644
|
| --- a/third_party/protobuf/src/google/protobuf/compiler/java/java_file.h
|
| +++ b/third_party/protobuf/src/google/protobuf/compiler/java/java_file.h
|
| @@ -1,6 +1,6 @@
|
| // Protocol Buffers - Google's data interchange format
|
| // Copyright 2008 Google Inc. All rights reserved.
|
| -// https://developers.google.com/protocol-buffers/
|
| +// http://code.google.com/p/protobuf/
|
| //
|
| // Redistribution and use in source and binary forms, with or without
|
| // modification, are permitted provided that the following conditions are
|
| @@ -35,29 +35,18 @@
|
| #ifndef GOOGLE_PROTOBUF_COMPILER_JAVA_FILE_H__
|
| #define GOOGLE_PROTOBUF_COMPILER_JAVA_FILE_H__
|
|
|
| -#include <memory>
|
| -#ifndef _SHARED_PTR_H
|
| -#include <google/protobuf/stubs/shared_ptr.h>
|
| -#endif
|
| #include <string>
|
| #include <vector>
|
| #include <google/protobuf/stubs/common.h>
|
|
|
| namespace google {
|
| namespace protobuf {
|
| - class FileDescriptor; // descriptor.h
|
| + class FileDescriptor; // descriptor.h
|
| namespace io {
|
| - class Printer; // printer.h
|
| + class Printer; // printer.h
|
| }
|
| namespace compiler {
|
| - class GeneratorContext; // code_generator.h
|
| - namespace java {
|
| - class Context; // context.h
|
| - class MessageGenerator; // message.h
|
| - class GeneratorFactory; // generator_factory.h
|
| - class ExtensionGenerator; // extension.h
|
| - class ClassNameResolver; // name_resolver.h
|
| - }
|
| + class GeneratorContext; // code_generator.h
|
| }
|
| }
|
|
|
| @@ -67,7 +56,7 @@ namespace java {
|
|
|
| class FileGenerator {
|
| public:
|
| - FileGenerator(const FileDescriptor* file, bool immutable_api = true);
|
| + explicit FileGenerator(const FileDescriptor* file);
|
| ~FileGenerator();
|
|
|
| // Checks for problems that would otherwise lead to cryptic compile errors.
|
| @@ -89,23 +78,17 @@ class FileGenerator {
|
|
|
|
|
| private:
|
| - void GenerateDescriptorInitializationCodeForImmutable(io::Printer* printer);
|
| - void GenerateDescriptorInitializationCodeForMutable(io::Printer* printer);
|
| -
|
| - bool ShouldIncludeDependency(const FileDescriptor* descriptor,
|
| - bool immutable_api_);
|
| + // Returns whether the dependency should be included in the output file.
|
| + // Always returns true for opensource, but used internally at Google to help
|
| + // improve compatibility with version 1 of protocol buffers.
|
| + bool ShouldIncludeDependency(const FileDescriptor* descriptor);
|
|
|
| const FileDescriptor* file_;
|
| string java_package_;
|
| string classname_;
|
|
|
| - google::protobuf::scoped_array<google::protobuf::scoped_ptr<MessageGenerator> > message_generators_;
|
| - google::protobuf::scoped_array<google::protobuf::scoped_ptr<ExtensionGenerator> > extension_generators_;
|
| - google::protobuf::scoped_ptr<GeneratorFactory> generator_factory_;
|
| - google::protobuf::scoped_ptr<Context> context_;
|
| - ClassNameResolver* name_resolver_;
|
| - bool immutable_api_;
|
|
|
| + void GenerateEmbeddedDescriptor(io::Printer* printer);
|
|
|
| GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(FileGenerator);
|
| };
|
|
|