File indexing completed on 2025-01-31 10:11:58
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef GOOGLE_PROTOBUF_COMPILER_JAVA_MESSAGE_BUILDER_LITE_H__
0013 #define GOOGLE_PROTOBUF_COMPILER_JAVA_MESSAGE_BUILDER_LITE_H__
0014
0015 #include <string>
0016
0017 #include "absl/container/btree_map.h"
0018 #include "google/protobuf/compiler/java/generator_common.h"
0019 #include "google/protobuf/compiler/java/lite/field_generator.h"
0020
0021 namespace google {
0022 namespace protobuf {
0023 namespace compiler {
0024 namespace java {
0025 class Context;
0026 class ClassNameResolver;
0027 }
0028 }
0029 namespace io {
0030 class Printer;
0031 }
0032 }
0033 }
0034
0035 namespace google {
0036 namespace protobuf {
0037 namespace compiler {
0038 namespace java {
0039
0040 class MessageBuilderLiteGenerator {
0041 public:
0042 explicit MessageBuilderLiteGenerator(const Descriptor* descriptor,
0043 Context* context);
0044 MessageBuilderLiteGenerator(const MessageBuilderLiteGenerator&) = delete;
0045 MessageBuilderLiteGenerator& operator=(const MessageBuilderLiteGenerator&) =
0046 delete;
0047 virtual ~MessageBuilderLiteGenerator();
0048
0049 virtual void Generate(io::Printer* printer);
0050
0051 private:
0052 void GenerateCommonBuilderMethods(io::Printer* printer);
0053
0054 const Descriptor* descriptor_;
0055 Context* context_;
0056 ClassNameResolver* name_resolver_;
0057 FieldGeneratorMap<ImmutableFieldLiteGenerator> field_generators_;
0058 absl::btree_map<int, const OneofDescriptor*> oneofs_;
0059 };
0060
0061 }
0062 }
0063 }
0064 }
0065
0066 #endif