Commit 8ee14740 authored by temporal's avatar temporal

Add a code generator insertion point for Java builders.

parent 684d45b2
...@@ -645,6 +645,11 @@ void MessageGenerator::GenerateBuilder(io::Printer* printer) { ...@@ -645,6 +645,11 @@ void MessageGenerator::GenerateBuilder(io::Printer* printer) {
.GenerateBuilderMembers(printer); .GenerateBuilderMembers(printer);
} }
printer->Print(
"\n"
"// @@protoc_insertion_point(builder_scope:$full_name$)\n",
"full_name", descriptor_->full_name());
printer->Outdent(); printer->Outdent();
printer->Print("}\n"); printer->Print("}\n");
} }
......
...@@ -61,6 +61,8 @@ class TestGenerator : public CodeGenerator { ...@@ -61,6 +61,8 @@ class TestGenerator : public CodeGenerator {
TryInsert("Test.java", "outer_class_scope", output_directory); TryInsert("Test.java", "outer_class_scope", output_directory);
TryInsert("Test.java", "class_scope:foo.Bar", output_directory); TryInsert("Test.java", "class_scope:foo.Bar", output_directory);
TryInsert("Test.java", "class_scope:foo.Bar.Baz", output_directory); TryInsert("Test.java", "class_scope:foo.Bar.Baz", output_directory);
TryInsert("Test.java", "builder_scope:foo.Bar", output_directory);
TryInsert("Test.java", "builder_scope:foo.Bar.Baz", output_directory);
TryInsert("Test.java", "enum_scope:foo.Qux", output_directory); TryInsert("Test.java", "enum_scope:foo.Qux", output_directory);
return true; return true;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment