Index: third_party/protobuf/src/google/protobuf/compiler/java/java_context.h |
diff --git a/third_party/protobuf/src/google/protobuf/compiler/java/java_context.h b/third_party/protobuf/src/google/protobuf/compiler/java/java_context.h |
index 5b595d07fced4d0a4786644c8d56695abbd61680..a480e45dc40cdb98067b869fddd32e8977dccef0 100644 |
--- a/third_party/protobuf/src/google/protobuf/compiler/java/java_context.h |
+++ b/third_party/protobuf/src/google/protobuf/compiler/java/java_context.h |
@@ -46,6 +46,7 @@ namespace protobuf { |
class FieldDescriptor; |
class OneofDescriptor; |
class Descriptor; |
+ class EnumDescriptor; |
namespace compiler { |
namespace java { |
class ClassNameResolver; // name_resolver.h |
@@ -78,6 +79,20 @@ class Context { |
const OneofGeneratorInfo* GetOneofGeneratorInfo( |
const OneofDescriptor* oneof) const; |
+ // Enforces all the files (including transitive dependencies) to use |
+ // LiteRuntime. |
+ void SetEnforceLite(bool enforce_lite) { |
+ enforce_lite_ = enforce_lite; |
+ } |
+ |
+ bool EnforceLite() const { |
+ return enforce_lite_; |
+ } |
+ |
+ // Does this message class have generated parsing, serialization, and other |
+ // standard methods for which reflection-based fallback implementations exist? |
+ bool HasGeneratedMethods(const Descriptor* descriptor) const; |
+ |
private: |
void InitializeFieldGeneratorInfo(const FileDescriptor* file); |
void InitializeFieldGeneratorInfoForMessage(const Descriptor* message); |
@@ -87,6 +102,7 @@ class Context { |
google::protobuf::scoped_ptr<ClassNameResolver> name_resolver_; |
map<const FieldDescriptor*, FieldGeneratorInfo> field_generator_info_map_; |
map<const OneofDescriptor*, OneofGeneratorInfo> oneof_generator_info_map_; |
+ bool enforce_lite_; |
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(Context); |
}; |