|
|
@ -44,6 +44,7 @@ |
|
|
|
#include <google/protobuf/compiler/java/java_message.h> |
|
|
|
#include <google/protobuf/compiler/java/java_message.h> |
|
|
|
#include <google/protobuf/compiler/java/java_name_resolver.h> |
|
|
|
#include <google/protobuf/compiler/java/java_name_resolver.h> |
|
|
|
#include <google/protobuf/compiler/java/java_service.h> |
|
|
|
#include <google/protobuf/compiler/java/java_service.h> |
|
|
|
|
|
|
|
#include <google/protobuf/compiler/java/java_shared_code_generator.h> |
|
|
|
#include <google/protobuf/compiler/code_generator.h> |
|
|
|
#include <google/protobuf/compiler/code_generator.h> |
|
|
|
#include <google/protobuf/io/printer.h> |
|
|
|
#include <google/protobuf/io/printer.h> |
|
|
|
#include <google/protobuf/io/zero_copy_stream.h> |
|
|
|
#include <google/protobuf/io/zero_copy_stream.h> |
|
|
@ -314,14 +315,13 @@ void FileGenerator::GenerateDescriptorInitializationCodeForImmutable( |
|
|
|
" getDescriptor() {\n" |
|
|
|
" getDescriptor() {\n" |
|
|
|
" return descriptor;\n" |
|
|
|
" return descriptor;\n" |
|
|
|
"}\n" |
|
|
|
"}\n" |
|
|
|
"private static com.google.protobuf.Descriptors.FileDescriptor\n" |
|
|
|
"public static com.google.protobuf.Descriptors.FileDescriptor\n" |
|
|
|
" descriptor;\n" |
|
|
|
" descriptor;\n" |
|
|
|
"static {\n"); |
|
|
|
"static {\n"); |
|
|
|
printer->Indent(); |
|
|
|
printer->Indent(); |
|
|
|
|
|
|
|
|
|
|
|
printer->Print( |
|
|
|
SharedCodeGenerator shared_code_generator(file_); |
|
|
|
"descriptor = $descriptor_classname$.descriptor;\n", |
|
|
|
shared_code_generator.GenerateDescriptors(printer); |
|
|
|
"descriptor_classname", name_resolver_->GetDescriptorClassName(file_)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i < file_->message_type_count(); i++) { |
|
|
|
for (int i = 0; i < file_->message_type_count(); i++) { |
|
|
|
message_generators_[i]->GenerateStaticVariableInitializers(printer); |
|
|
|
message_generators_[i]->GenerateStaticVariableInitializers(printer); |
|
|
|