Lines Matching refs:printer

41 #include <google/protobuf/io/printer.h>
62 void ImmutableServiceGenerator::Generate(io::Printer* printer) {
65 WriteServiceDocComment(printer, descriptor_);
66 printer->Print(
71 printer->Indent();
73 printer->Print(
77 GenerateInterface(printer);
79 GenerateNewReflectiveServiceMethod(printer);
80 GenerateNewReflectiveBlockingServiceMethod(printer);
82 GenerateAbstractMethods(printer);
85 printer->Print(
93 GenerateGetDescriptorForType(printer);
96 GenerateCallMethod(printer);
97 GenerateGetPrototype(REQUEST, printer);
98 GenerateGetPrototype(RESPONSE, printer);
99 GenerateStub(printer);
100 GenerateBlockingStub(printer);
103 printer->Print(
108 printer->Outdent();
109 printer->Print("}\n\n");
113 io::Printer* printer) {
114 printer->Print(
121 void ImmutableServiceGenerator::GenerateInterface(io::Printer* printer) {
122 printer->Print("public interface Interface {\n");
123 printer->Indent();
124 GenerateAbstractMethods(printer);
125 printer->Outdent();
126 printer->Print("}\n\n");
130 io::Printer* printer) {
131 printer->Print(
136 printer->Indent();
137 printer->Indent();
141 printer->Print("@java.lang.Override\n");
142 GenerateMethodSignature(printer, method, IS_CONCRETE);
143 printer->Print(
150 printer->Outdent();
151 printer->Print("};\n");
152 printer->Outdent();
153 printer->Print("}\n\n");
157 io::Printer* printer) {
158 printer->Print(
162 printer->Indent();
163 printer->Indent();
165 GenerateGetDescriptorForType(printer);
167 GenerateCallBlockingMethod(printer);
168 GenerateGetPrototype(REQUEST, printer);
169 GenerateGetPrototype(RESPONSE, printer);
171 printer->Outdent();
172 printer->Print("};\n");
173 printer->Outdent();
174 printer->Print("}\n\n");
177 void ImmutableServiceGenerator::GenerateAbstractMethods(io::Printer* printer) {
180 WriteMethodDocComment(printer, method);
181 GenerateMethodSignature(printer, method, IS_ABSTRACT);
182 printer->Print(";\n\n");
186 void ImmutableServiceGenerator::GenerateCallMethod(io::Printer* printer) {
187 printer->Print(
201 printer->Indent();
202 printer->Indent();
213 printer->Print(vars,
221 printer->Print(
225 printer->Outdent();
226 printer->Outdent();
228 printer->Print(
235 io::Printer* printer) {
236 printer->Print(
249 printer->Indent();
250 printer->Indent();
261 printer->Print(vars,
266 printer->Print(
270 printer->Outdent();
271 printer->Outdent();
273 printer->Print(
280 io::Printer* printer) {
285 printer->Print(
296 printer->Indent();
297 printer->Indent();
305 printer->Print(vars,
310 printer->Print(
314 printer->Outdent();
315 printer->Outdent();
317 printer->Print(
323 void ImmutableServiceGenerator::GenerateStub(io::Printer* printer) {
324 printer->Print(
333 printer->Indent();
335 printer->Print(
348 printer->Print("\n");
349 GenerateMethodSignature(printer, method, IS_CONCRETE);
350 printer->Print(" {\n");
351 printer->Indent();
357 printer->Print(vars,
368 printer->Outdent();
369 printer->Print("}\n");
372 printer->Outdent();
373 printer->Print(
378 void ImmutableServiceGenerator::GenerateBlockingStub(io::Printer* printer) {
379 printer->Print(
386 printer->Print(
388 printer->Indent();
392 GenerateBlockingMethodSignature(printer, method);
393 printer->Print(";\n");
396 printer->Outdent();
397 printer->Print(
401 printer->Print(
403 printer->Indent();
405 printer->Print(
414 GenerateBlockingMethodSignature(printer, method);
415 printer->Print(" {\n");
416 printer->Indent();
422 printer->Print(vars,
429 printer->Outdent();
430 printer->Print(
435 printer->Outdent();
436 printer->Print("}\n");
439 void ImmutableServiceGenerator::GenerateMethodSignature(io::Printer* printer,
447 printer->Print(vars,
455 io::Printer* printer,
461 printer->Print(vars,