| Index: third_party/protobuf/src/google/protobuf/compiler/java/java_enum_lite.h
|
| diff --git a/third_party/protobuf/src/google/protobuf/compiler/java/java_enum.h b/third_party/protobuf/src/google/protobuf/compiler/java/java_enum_lite.h
|
| similarity index 79%
|
| copy from third_party/protobuf/src/google/protobuf/compiler/java/java_enum.h
|
| copy to third_party/protobuf/src/google/protobuf/compiler/java/java_enum_lite.h
|
| index 9a9e5742ac3b8590e2e2c00de5123e681a53494e..ee2f5f7a88c79b37a11ddaf0738c2d0200725804 100644
|
| --- a/third_party/protobuf/src/google/protobuf/compiler/java/java_enum.h
|
| +++ b/third_party/protobuf/src/google/protobuf/compiler/java/java_enum_lite.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,8 +32,8 @@
|
| // Based on original Protocol Buffers design by
|
| // Sanjay Ghemawat, Jeff Dean, and others.
|
|
|
| -#ifndef GOOGLE_PROTOBUF_COMPILER_JAVA_ENUM_H__
|
| -#define GOOGLE_PROTOBUF_COMPILER_JAVA_ENUM_H__
|
| +#ifndef GOOGLE_PROTOBUF_COMPILER_JAVA_ENUM_LITE_H__
|
| +#define GOOGLE_PROTOBUF_COMPILER_JAVA_ENUM_LITE_H__
|
|
|
| #include <string>
|
| #include <vector>
|
| @@ -41,6 +41,12 @@
|
|
|
| namespace google {
|
| namespace protobuf {
|
| + namespace compiler {
|
| + namespace java {
|
| + class Context; // context.h
|
| + class ClassNameResolver; // name_resolver.h
|
| + }
|
| + }
|
| namespace io {
|
| class Printer; // printer.h
|
| }
|
| @@ -50,10 +56,12 @@ namespace protobuf {
|
| namespace compiler {
|
| namespace java {
|
|
|
| -class EnumGenerator {
|
| +class EnumLiteGenerator {
|
| public:
|
| - explicit EnumGenerator(const EnumDescriptor* descriptor);
|
| - ~EnumGenerator();
|
| + explicit EnumLiteGenerator(const EnumDescriptor* descriptor,
|
| + bool immutable_api,
|
| + Context* context);
|
| + ~EnumLiteGenerator();
|
|
|
| void Generate(io::Printer* printer);
|
|
|
| @@ -73,9 +81,14 @@ class EnumGenerator {
|
| };
|
| vector<Alias> aliases_;
|
|
|
| + bool immutable_api_;
|
| +
|
| + Context* context_;
|
| + ClassNameResolver* name_resolver_;
|
| +
|
| bool CanUseEnumValues();
|
|
|
| - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(EnumGenerator);
|
| + GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(EnumLiteGenerator);
|
| };
|
|
|
| } // namespace java
|
| @@ -83,4 +96,4 @@ class EnumGenerator {
|
| } // namespace protobuf
|
|
|
| } // namespace google
|
| -#endif // GOOGLE_PROTOBUF_COMPILER_JAVA_ENUM_H__
|
| +#endif // GOOGLE_PROTOBUF_COMPILER_JAVA_ENUM_LITE_H__
|
|
|