Index: third_party/protobuf/src/google/protobuf/compiler/javanano/javanano_file.h |
diff --git a/third_party/protobuf/src/google/protobuf/compiler/java/java_file.h b/third_party/protobuf/src/google/protobuf/compiler/javanano/javanano_file.h |
similarity index 82% |
copy from third_party/protobuf/src/google/protobuf/compiler/java/java_file.h |
copy to third_party/protobuf/src/google/protobuf/compiler/javanano/javanano_file.h |
index 59911462668d56811f2bcc762a5556431c36b32e..217eafe2a88e6fd5125934602471839147da2d05 100644 |
--- a/third_party/protobuf/src/google/protobuf/compiler/java/java_file.h |
+++ b/third_party/protobuf/src/google/protobuf/compiler/javanano/javanano_file.h |
@@ -32,12 +32,13 @@ |
// Based on original Protocol Buffers design by |
// Sanjay Ghemawat, Jeff Dean, and others. |
-#ifndef GOOGLE_PROTOBUF_COMPILER_JAVA_FILE_H__ |
-#define GOOGLE_PROTOBUF_COMPILER_JAVA_FILE_H__ |
+#ifndef GOOGLE_PROTOBUF_COMPILER_JAVANANO_FILE_H__ |
+#define GOOGLE_PROTOBUF_COMPILER_JAVANANO_FILE_H__ |
#include <string> |
#include <vector> |
#include <google/protobuf/stubs/common.h> |
+#include <google/protobuf/compiler/javanano/javanano_params.h> |
namespace google { |
namespace protobuf { |
@@ -52,11 +53,11 @@ namespace protobuf { |
namespace protobuf { |
namespace compiler { |
-namespace java { |
+namespace javanano { |
class FileGenerator { |
public: |
- explicit FileGenerator(const FileDescriptor* file); |
+ explicit FileGenerator(const FileDescriptor* file, const Params& params); |
~FileGenerator(); |
// Checks for problems that would otherwise lead to cryptic compile errors. |
@@ -70,32 +71,24 @@ class FileGenerator { |
// files other than the outer file (i.e. one for each message, enum, and |
// service type). |
void GenerateSiblings(const string& package_dir, |
- GeneratorContext* generator_context, |
+ GeneratorContext* output_directory, |
vector<string>* file_list); |
const string& java_package() { return java_package_; } |
const string& classname() { return classname_; } |
- |
private: |
- // 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_; |
+ const Params& params_; |
string java_package_; |
string classname_; |
- |
- void GenerateEmbeddedDescriptor(io::Printer* printer); |
- |
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(FileGenerator); |
}; |
-} // namespace java |
+} // namespace javanano |
} // namespace compiler |
} // namespace protobuf |
} // namespace google |
-#endif // GOOGLE_PROTOBUF_COMPILER_JAVA_FILE_H__ |
+#endif // GOOGLE_PROTOBUF_COMPILER_JAVANANO_FILE_H__ |