File indexing completed on 2025-01-31 10:11:58
0001
0002
0003
0004
0005
0006
0007
0008 #ifndef GOOGLE_PROTOBUF_COMPILER_JAVA_EXTENSION_LITE_H__
0009 #define GOOGLE_PROTOBUF_COMPILER_JAVA_EXTENSION_LITE_H__
0010
0011 #include <string>
0012
0013 #include "google/protobuf/compiler/java/generator_factory.h"
0014 #include "google/protobuf/descriptor.h"
0015 #include "google/protobuf/port.h"
0016
0017 namespace google {
0018 namespace protobuf {
0019 namespace compiler {
0020 namespace java {
0021
0022
0023
0024
0025 class ImmutableExtensionLiteGenerator : public ExtensionGenerator {
0026 public:
0027 explicit ImmutableExtensionLiteGenerator(const FieldDescriptor* descriptor,
0028 Context* context);
0029 ImmutableExtensionLiteGenerator(const ImmutableExtensionLiteGenerator&) =
0030 delete;
0031 ImmutableExtensionLiteGenerator& operator=(
0032 const ImmutableExtensionLiteGenerator&) = delete;
0033 ~ImmutableExtensionLiteGenerator() override;
0034
0035 void Generate(io::Printer* printer) override;
0036
0037
0038 int GenerateNonNestedInitializationCode(io::Printer* printer) override;
0039
0040
0041 int GenerateRegistrationCode(io::Printer* printer) override;
0042
0043 private:
0044 const FieldDescriptor* descriptor_;
0045 ClassNameResolver* name_resolver_;
0046 std::string scope_;
0047 Context* context_;
0048 };
0049
0050 }
0051 }
0052 }
0053 }
0054
0055 #endif