Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-29 09:14:03

0001 // Protocol Buffers - Google's data interchange format
0002 // Copyright 2008 Google Inc.  All rights reserved.
0003 //
0004 // Use of this source code is governed by a BSD-style
0005 // license that can be found in the LICENSE file or at
0006 // https://developers.google.com/open-source/licenses/bsd
0007 
0008 // Author: kenton@google.com (Kenton Varda)
0009 //  Based on original Protocol Buffers design by
0010 //  Sanjay Ghemawat, Jeff Dean, and others.
0011 
0012 #ifndef GOOGLE_PROTOBUF_COMPILER_JAVA_DOC_COMMENT_H__
0013 #define GOOGLE_PROTOBUF_COMPILER_JAVA_DOC_COMMENT_H__
0014 
0015 #include <stdbool.h>
0016 
0017 #include "absl/strings/string_view.h"
0018 #include "google/protobuf/compiler/java/options.h"
0019 #include "google/protobuf/descriptor.h"
0020 
0021 // Must be included last.
0022 #include "google/protobuf/port_def.inc"
0023 
0024 namespace google {
0025 namespace protobuf {
0026 namespace io {
0027 class Printer;  // printer.h
0028 }
0029 }  // namespace protobuf
0030 }  // namespace google
0031 
0032 namespace google {
0033 namespace protobuf {
0034 namespace compiler {
0035 namespace java {
0036 
0037 enum FieldAccessorType {
0038   HAZZER,
0039   GETTER,
0040   SETTER,
0041   CLEARER,
0042   // Repeated
0043   LIST_COUNT,
0044   LIST_GETTER,
0045   LIST_INDEXED_GETTER,
0046   LIST_INDEXED_SETTER,
0047   LIST_ADDER,
0048   LIST_MULTI_ADDER
0049 };
0050 
0051 void WriteMessageDocComment(io::Printer* printer, const Descriptor* message,
0052                             Options options, bool kdoc = false);
0053 void WriteFieldDocComment(io::Printer* printer, const FieldDescriptor* field,
0054                           Options options, bool kdoc = false);
0055 void WriteFieldAccessorDocComment(io::Printer* printer,
0056                                   const FieldDescriptor* field,
0057                                   FieldAccessorType type, Options options,
0058                                   bool builder = false, bool kdoc = false,
0059                                   bool is_private = false);
0060 void WriteFieldEnumValueAccessorDocComment(
0061     io::Printer* printer, const FieldDescriptor* field, FieldAccessorType type,
0062     Options options, bool builder = false, bool is_private = false);
0063 void WriteFieldStringBytesAccessorDocComment(
0064     io::Printer* printer, const FieldDescriptor* field, FieldAccessorType type,
0065     Options options, bool builder = false, bool kdoc = false,
0066     bool is_private = false);
0067 void WriteEnumDocComment(io::Printer* printer, const EnumDescriptor* enum_,
0068                          Options options, bool kdoc = false);
0069 void WriteEnumValueDocComment(io::Printer* printer,
0070                               const EnumValueDescriptor* value,
0071                               Options options);
0072 void WriteServiceDocComment(io::Printer* printer,
0073                             const ServiceDescriptor* service, Options options);
0074 void WriteMethodDocComment(io::Printer* printer, const MethodDescriptor* method,
0075                            Options options);
0076 
0077 // Exposed for testing only.
0078 // Also called by proto1-Java code generator.
0079 PROTOC_EXPORT std::string EscapeJavadoc(absl::string_view input);
0080 
0081 }  // namespace java
0082 }  // namespace compiler
0083 }  // namespace protobuf
0084 }  // namespace google
0085 
0086 #include "google/protobuf/port_undef.inc"
0087 
0088 #endif  // GOOGLE_PROTOBUF_COMPILER_JAVA_DOC_COMMENT_H__