File indexing completed on 2025-11-04 10:14:39
0001 
0002 
0003 
0004 
0005 
0006 
0007 
0008 
0009 
0010 
0011 
0012 #ifndef GOOGLE_PROTOBUF_COMPILER_JAVA_SHARED_CODE_GENERATOR_H__
0013 #define GOOGLE_PROTOBUF_COMPILER_JAVA_SHARED_CODE_GENERATOR_H__
0014 
0015 #include <memory>
0016 #include <string>
0017 #include <vector>
0018 
0019 #include "google/protobuf/compiler/java/options.h"
0020 #include "google/protobuf/port.h"
0021 
0022 namespace google {
0023 namespace protobuf {
0024 class FileDescriptor;  
0025 namespace compiler {
0026 class GeneratorContext;  
0027 namespace java {
0028 class ClassNameResolver;  
0029 }
0030 }  
0031 namespace io {
0032 class Printer;  
0033 }
0034 }  
0035 }  
0036 
0037 namespace google {
0038 namespace protobuf {
0039 namespace compiler {
0040 namespace java {
0041 
0042 
0043 
0044 class SharedCodeGenerator {
0045  public:
0046   SharedCodeGenerator(const FileDescriptor* file, const Options& options);
0047   SharedCodeGenerator(const SharedCodeGenerator&) = delete;
0048   SharedCodeGenerator& operator=(const SharedCodeGenerator&) = delete;
0049   ~SharedCodeGenerator();
0050 
0051   void Generate(GeneratorContext* generator_context,
0052                 std::vector<std::string>* file_list,
0053                 std::vector<std::string>* annotation_file_list);
0054 
0055   void GenerateDescriptors(io::Printer* printer);
0056 
0057  private:
0058   std::unique_ptr<ClassNameResolver> name_resolver_;
0059   const FileDescriptor* file_;
0060   const Options options_;
0061 };
0062 
0063 }  
0064 }  
0065 }  
0066 }  
0067 
0068 #endif