internal change

PiperOrigin-RevId: 595509922
pull/15266/head
Sandy Zhang 11 months ago committed by Copybara-Service
parent f4ff5018df
commit b660646cc2
  1. 11
      src/google/protobuf/compiler/java/shared_code_generator.cc

@ -73,10 +73,21 @@ void SharedCodeGenerator::Generate(
if (!options_.opensource_runtime) { if (!options_.opensource_runtime) {
printer->Print("@com.google.protobuf.Internal.ProtoNonnullApi\n"); printer->Print("@com.google.protobuf.Internal.ProtoNonnullApi\n");
} }
printer->Print( printer->Print(
"public final class $classname$ {\n" "public final class $classname$ {\n"
" /* This variable is to be called by generated code only. It "
"returns\n"
" * an incomplete descriptor for internal use only. */\n"
" public static com.google.protobuf.Descriptors.FileDescriptor\n" " public static com.google.protobuf.Descriptors.FileDescriptor\n"
" descriptor;\n" " descriptor;\n"
" /* This method is to be called by generated code only. It returns\n"
" * an incomplete descriptor for internal use only. */\n"
" public static com.google.protobuf.Descriptors.FileDescriptor "
"getDescriptor() {\n"
" return descriptor;\n"
" }\n"
" static {\n", " static {\n",
"classname", classname); "classname", classname);
printer->Annotate("classname", file_->name()); printer->Annotate("classname", file_->name());

Loading…
Cancel
Save