• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Protocol Buffers - Google's data interchange format
2 // Copyright 2008 Google Inc.  All rights reserved.
3 //
4 // Use of this source code is governed by a BSD-style
5 // license that can be found in the LICENSE file or at
6 // https://developers.google.com/open-source/licenses/bsd
7 
8 #ifndef GOOGLE_PROTOBUF_COMPILER_JAVA_OPTIONS_H__
9 #define GOOGLE_PROTOBUF_COMPILER_JAVA_OPTIONS_H__
10 
11 #include <string>
12 
13 #include "google/protobuf/port.h"
14 
15 namespace google {
16 namespace protobuf {
17 namespace compiler {
18 namespace java {
19 
20 // Generator options
21 struct Options {
OptionsOptions22   Options()
23       : generate_immutable_code(false),
24         generate_mutable_code(false),
25         generate_shared_code(false),
26         enforce_lite(false),
27         annotate_code(false),
28         strip_nonfunctional_codegen(false),
29         jvm_dsl(true) {}
30 
31   bool generate_immutable_code;
32   bool generate_mutable_code;
33   bool generate_shared_code;
34   // When set, the protoc will generate the current files and all the transitive
35   // dependencies as lite runtime.
36   bool enforce_lite;
37   bool opensource_runtime = google::protobuf::internal::IsOss();
38   // If true, we should build .meta files and emit @Generated annotations into
39   // generated code.
40   bool annotate_code;
41   // Name of a file where we will write a list of generated .meta file names,
42   // one per line.
43   std::string annotation_list_file;
44   // Name of a file where we will write a list of generated file names, one
45   // per line.
46   std::string output_list_file;
47   // If true, strip out nonfunctional codegen.
48   bool strip_nonfunctional_codegen;
49 
50   // If true, generate JVM-specific DSL code.  This defaults to true for
51   // compatibility with the old behavior.
52   bool jvm_dsl;
53 };
54 
55 }  // namespace java
56 }  // namespace compiler
57 }  // namespace protobuf
58 }  // namespace google
59 
60 #endif  // GOOGLE_PROTOBUF_COMPILER_JAVA_OPTIONS_H__
61