Merge pull request #645 from zsurocking/master

Down integrate. Generate a package name suffix ".nano" for nano messages
pull/700/head
Paul Yang 9 years ago
commit b76b76ba4f
  1. 8
      javanano/src/test/java/com/google/protobuf/nano/NanoTest.java
  2. 2
      javanano/src/test/java/com/google/protobuf/nano/map_test.proto
  3. 2
      javanano/src/test/java/com/google/protobuf/nano/unittest_accessors_nano.proto
  4. 2
      javanano/src/test/java/com/google/protobuf/nano/unittest_enum_class_multiple_nano.proto
  5. 2
      javanano/src/test/java/com/google/protobuf/nano/unittest_enum_class_nano.proto
  6. 2
      javanano/src/test/java/com/google/protobuf/nano/unittest_enum_validity_nano.proto
  7. 2
      javanano/src/test/java/com/google/protobuf/nano/unittest_extension_packed_nano.proto
  8. 2
      javanano/src/test/java/com/google/protobuf/nano/unittest_extension_repeated_nano.proto
  9. 2
      javanano/src/test/java/com/google/protobuf/nano/unittest_extension_singular_nano.proto
  10. 2
      javanano/src/test/java/com/google/protobuf/nano/unittest_has_nano.proto
  11. 2
      javanano/src/test/java/com/google/protobuf/nano/unittest_multiple_nameclash_nano.proto
  12. 2
      javanano/src/test/java/com/google/protobuf/nano/unittest_multiple_nano.proto
  13. 2
      javanano/src/test/java/com/google/protobuf/nano/unittest_nano.proto
  14. 2
      javanano/src/test/java/com/google/protobuf/nano/unittest_recursive_nano.proto
  15. 2
      javanano/src/test/java/com/google/protobuf/nano/unittest_reference_types_nano.proto
  16. 2
      javanano/src/test/java/com/google/protobuf/nano/unittest_repeated_merge_nano.proto
  17. 2
      javanano/src/test/java/com/google/protobuf/nano/unittest_repeated_packables_nano.proto
  18. 2
      javanano/src/test/java/com/google/protobuf/nano/unittest_simple_nano.proto
  19. 2
      javanano/src/test/java/com/google/protobuf/nano/unittest_single_nano.proto
  20. 2
      javanano/src/test/java/com/google/protobuf/nano/unittest_stringutf8_nano.proto
  21. 5
      src/google/protobuf/any.pb.cc
  22. 5
      src/google/protobuf/api.pb.cc
  23. 9
      src/google/protobuf/compiler/javanano/javanano_generator.cc
  24. 8
      src/google/protobuf/compiler/javanano/javanano_helpers.cc
  25. 168
      src/google/protobuf/descriptor.pb.cc
  26. 40
      src/google/protobuf/descriptor.pb.h
  27. 5
      src/google/protobuf/descriptor.proto
  28. 6
      src/google/protobuf/duration.pb.cc
  29. 5
      src/google/protobuf/empty.pb.cc
  30. 5
      src/google/protobuf/field_mask.pb.cc
  31. 5
      src/google/protobuf/source_context.pb.cc
  32. 6
      src/google/protobuf/struct.pb.cc
  33. 6
      src/google/protobuf/timestamp.pb.cc
  34. 6
      src/google/protobuf/type.pb.cc
  35. 4
      src/google/protobuf/wrappers.pb.cc

@ -40,10 +40,10 @@ import com.google.protobuf.nano.UnittestRecursiveNano.RecursiveMessageNano;
import com.google.protobuf.nano.NanoReferenceTypesCompat;
import com.google.protobuf.nano.UnittestSimpleNano.SimpleMessageNano;
import com.google.protobuf.nano.UnittestSingleNano.SingleMessageNano;
import com.google.protobuf.nano.testext.Extensions;
import com.google.protobuf.nano.testext.Extensions.AnotherMessage;
import com.google.protobuf.nano.testext.Extensions.MessageWithGroup;
import com.google.protobuf.nano.testimport.UnittestImportNano;
import com.google.protobuf.nano.testext.nano.Extensions;
import com.google.protobuf.nano.testext.nano.Extensions.AnotherMessage;
import com.google.protobuf.nano.testext.nano.Extensions.MessageWithGroup;
import com.google.protobuf.nano.testimport.nano.UnittestImportNano;
import junit.framework.TestCase;

@ -32,7 +32,7 @@ syntax = "proto3";
package map_test;
option java_package = "com.google.protobuf.nano";
option java_package = "com.google.protobuf";
option java_outer_classname = "MapTestProto";
message TestMap {

@ -32,7 +32,7 @@
package protobuf_unittest;
option java_package = "com.google.protobuf.nano";
option java_package = "com.google.protobuf";
option java_outer_classname = "NanoAccessorsOuterClass";
message TestNanoAccessors {

@ -32,7 +32,7 @@
package protobuf_unittest;
option java_package = "com.google.protobuf.nano";
option java_package = "com.google.protobuf";
option java_multiple_files = true;
enum FileScopeEnumMultiple {

@ -32,7 +32,7 @@
package protobuf_unittest;
option java_package = "com.google.protobuf.nano";
option java_package = "com.google.protobuf";
option java_outer_classname = "EnumClassNanos";
enum FileScopeEnum {

@ -1,6 +1,6 @@
package protobuf_unittest;
option java_package = "com.google.protobuf.nano";
option java_package = "com.google.protobuf";
option java_outer_classname = "EnumValidity";
enum E {

@ -1,7 +1,7 @@
syntax = "proto2";
option java_multiple_files = true;
option java_package = "com.google.protobuf.nano";
option java_package = "com.google.protobuf";
import "google/protobuf/nano/unittest_extension_nano.proto";

@ -1,7 +1,7 @@
syntax = "proto2";
option java_multiple_files = true;
option java_package = "com.google.protobuf.nano";
option java_package = "com.google.protobuf";
import "google/protobuf/nano/unittest_extension_nano.proto";

@ -1,7 +1,7 @@
syntax = "proto2";
option java_multiple_files = true;
option java_package = "com.google.protobuf.nano";
option java_package = "com.google.protobuf";
import "google/protobuf/nano/unittest_extension_nano.proto";

@ -32,7 +32,7 @@
package protobuf_unittest;
option java_package = "com.google.protobuf.nano";
option java_package = "com.google.protobuf";
option java_outer_classname = "NanoHasOuterClass";
message TestAllTypesNanoHas {

@ -32,7 +32,7 @@
package protobuf_unittest_import;
option java_package = "com.google.protobuf.nano";
option java_package = "com.google.protobuf";
option java_outer_classname = "MultipleNameClashNano";
option java_multiple_files = true;

@ -34,7 +34,7 @@ package protobuf_unittest_import;
import "google/protobuf/nano/unittest_import_nano.proto";
option java_package = "com.google.protobuf.nano";
option java_package = "com.google.protobuf";
option java_multiple_files = true;
enum FileScopeEnum {

@ -34,7 +34,7 @@ package protobuf_unittest;
import "google/protobuf/nano/unittest_import_nano.proto";
option java_package = "com.google.protobuf.nano";
option java_package = "com.google.protobuf";
option java_outer_classname = "NanoOuterClass";
// Same as TestAllTypes but with the nano runtime.

@ -33,7 +33,7 @@
package protobuf_unittest_import;
option java_package = "com.google.protobuf.nano";
option java_package = "com.google.protobuf";
// Explicit outer classname to suppress legacy info.
option java_outer_classname = "UnittestRecursiveNano";

@ -1,6 +1,6 @@
package protobuf_unittest;
option java_package = "com.google.protobuf.nano";
option java_package = "com.google.protobuf";
option java_outer_classname = "NanoReferenceTypes";
message TestAllTypesNano {

@ -34,7 +34,7 @@ package protobuf_unittest;
import "google/protobuf/nano/unittest_nano.proto";
option java_package = "com.google.protobuf.nano";
option java_package = "com.google.protobuf";
option java_multiple_files = true;
// A container message for testing the merging of repeated fields at a

@ -32,7 +32,7 @@
package protobuf_unittest;
option java_package = "com.google.protobuf.nano";
option java_package = "com.google.protobuf";
option java_outer_classname = "NanoRepeatedPackables";
enum Enum {

@ -33,7 +33,7 @@
package protobuf_unittest_import;
option java_package = "com.google.protobuf.nano";
option java_package = "com.google.protobuf";
// Explicit outer classname to suppress legacy info.
option java_outer_classname = "UnittestSimpleNano";

@ -32,7 +32,7 @@
package protobuf_unittest_import;
option java_package = "com.google.protobuf.nano";
option java_package = "com.google.protobuf";
message SingleMessageNano {
}

@ -33,7 +33,7 @@
package protobuf_unittest_import;
option java_package = "com.google.protobuf.nano";
option java_package = "com.google.protobuf";
// Explicit outer classname to suppress legacy info.
option java_outer_classname = "UnittestStringutf8Nano";

@ -82,8 +82,9 @@ void protobuf_AddDesc_google_2fprotobuf_2fany_2eproto() {
::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
"\n\031google/protobuf/any.proto\022\017google.prot"
"obuf\"&\n\003Any\022\020\n\010type_url\030\001 \001(\t\022\r\n\005value\030\002"
" \001(\014B<\n\023com.google.protobufB\010AnyProtoP\001\240"
"\001\001\242\002\003GPB\252\002\017Google.Protobufb\006proto3", 154);
" \001(\014BK\n\023com.google.protobufB\010AnyProtoP\001\240"
"\001\001\242\002\003GPB\252\002\036Google.Protobuf.WellKnownType"
"sb\006proto3", 169);
::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
"google/protobuf/any.proto", &protobuf_RegisterTypes);
Any::default_instance_ = new Any();

@ -123,8 +123,9 @@ void protobuf_AddDesc_google_2fprotobuf_2fapi_2eproto() {
"quest_type_url\030\002 \001(\t\022\031\n\021request_streamin"
"g\030\003 \001(\010\022\031\n\021response_type_url\030\004 \001(\t\022\032\n\022re"
"sponse_streaming\030\005 \001(\010\022(\n\007options\030\006 \003(\0132"
"\027.google.protobuf.OptionB\'\n\023com.google.p"
"rotobufB\010ApiProtoP\001\242\002\003GPBb\006proto3", 513);
"\027.google.protobuf.OptionBH\n\023com.google.p"
"rotobufB\010ApiProtoP\001\242\002\003GPB\252\002\036Google.Proto"
"buf.WellKnownTypesb\006proto3", 546);
::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
"google/protobuf/api.proto", &protobuf_RegisterTypes);
Api::default_instance_ = new Api();

@ -67,8 +67,15 @@ void UpdateParamsRecursively(Params& params,
file->name(), file->options().java_outer_classname());
}
if (file->options().has_java_package()) {
string result = file->options().java_package();
if (!file->options().javanano_use_deprecated_package()) {
if (!result.empty()) {
result += ".";
}
result += "nano";
}
params.set_java_package(
file->name(), file->options().java_package());
file->name(), result);
}
if (file->options().has_java_multiple_files()) {
params.set_java_multiple_files(

@ -200,6 +200,14 @@ string FileJavaPackage(const Params& params, const FileDescriptor* file) {
if (!result.empty()) result += '.';
result += file->package();
}
if (!file->options().javanano_use_deprecated_package()) {
if (!result.empty()) {
result += ".";
}
result += "nano";
}
return result;
}
}

@ -311,7 +311,7 @@ void protobuf_AssignDesc_google_2fprotobuf_2fdescriptor_2eproto() {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodDescriptorProto, _internal_metadata_),
-1);
FileOptions_descriptor_ = file->message_type(9);
static const int FileOptions_offsets_[15] = {
static const int FileOptions_offsets_[16] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, java_package_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, java_outer_classname_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, java_multiple_files_),
@ -326,6 +326,7 @@ void protobuf_AssignDesc_google_2fprotobuf_2fdescriptor_2eproto() {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, cc_enable_arenas_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, objc_class_prefix_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, csharp_namespace_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, javanano_use_deprecated_package_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, uninterpreted_option_),
};
FileOptions_reflection_ =
@ -695,7 +696,7 @@ void protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto() {
"_type\030\002 \001(\t\022\023\n\013output_type\030\003 \001(\t\022/\n\007opti"
"ons\030\004 \001(\0132\036.google.protobuf.MethodOption"
"s\022\037\n\020client_streaming\030\005 \001(\010:\005false\022\037\n\020se"
"rver_streaming\030\006 \001(\010:\005false\"\201\005\n\013FileOpti"
"rver_streaming\030\006 \001(\010:\005false\"\252\005\n\013FileOpti"
"ons\022\024\n\014java_package\030\001 \001(\t\022\034\n\024java_outer_"
"classname\030\010 \001(\t\022\"\n\023java_multiple_files\030\n"
" \001(\010:\005false\022,\n\035java_generate_equals_and_"
@ -708,54 +709,55 @@ void protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto() {
"vices\030\022 \001(\010:\005false\022\031\n\ndeprecated\030\027 \001(\010:\005"
"false\022\037\n\020cc_enable_arenas\030\037 \001(\010:\005false\022\031"
"\n\021objc_class_prefix\030$ \001(\t\022\030\n\020csharp_name"
"space\030% \001(\t\022C\n\024uninterpreted_option\030\347\007 \003"
"(\0132$.google.protobuf.UninterpretedOption"
"\":\n\014OptimizeMode\022\t\n\005SPEED\020\001\022\r\n\tCODE_SIZE"
"\020\002\022\020\n\014LITE_RUNTIME\020\003*\t\010\350\007\020\200\200\200\200\002\"\346\001\n\016Mess"
"ageOptions\022&\n\027message_set_wire_format\030\001 "
"\001(\010:\005false\022.\n\037no_standard_descriptor_acc"
"essor\030\002 \001(\010:\005false\022\031\n\ndeprecated\030\003 \001(\010:\005"
"false\022\021\n\tmap_entry\030\007 \001(\010\022C\n\024uninterprete"
"d_option\030\347\007 \003(\0132$.google.protobuf.Uninte"
"rpretedOption*\t\010\350\007\020\200\200\200\200\002\"\230\003\n\014FieldOption"
"s\022:\n\005ctype\030\001 \001(\0162#.google.protobuf.Field"
"Options.CType:\006STRING\022\016\n\006packed\030\002 \001(\010\022\?\n"
"\006jstype\030\006 \001(\0162$.google.protobuf.FieldOpt"
"ions.JSType:\tJS_NORMAL\022\023\n\004lazy\030\005 \001(\010:\005fa"
"lse\022\031\n\ndeprecated\030\003 \001(\010:\005false\022\023\n\004weak\030\n"
" \001(\010:\005false\022C\n\024uninterpreted_option\030\347\007 \003"
"(\0132$.google.protobuf.UninterpretedOption"
"\"/\n\005CType\022\n\n\006STRING\020\000\022\010\n\004CORD\020\001\022\020\n\014STRIN"
"G_PIECE\020\002\"5\n\006JSType\022\r\n\tJS_NORMAL\020\000\022\r\n\tJS"
"_STRING\020\001\022\r\n\tJS_NUMBER\020\002*\t\010\350\007\020\200\200\200\200\002\"\215\001\n\013"
"EnumOptions\022\023\n\013allow_alias\030\002 \001(\010\022\031\n\ndepr"
"ecated\030\003 \001(\010:\005false\022C\n\024uninterpreted_opt"
"ion\030\347\007 \003(\0132$.google.protobuf.Uninterpret"
"edOption*\t\010\350\007\020\200\200\200\200\002\"}\n\020EnumValueOptions\022"
"\031\n\ndeprecated\030\001 \001(\010:\005false\022C\n\024uninterpre"
"ted_option\030\347\007 \003(\0132$.google.protobuf.Unin"
"terpretedOption*\t\010\350\007\020\200\200\200\200\002\"{\n\016ServiceOpt"
"ions\022\031\n\ndeprecated\030! \001(\010:\005false\022C\n\024unint"
"erpreted_option\030\347\007 \003(\0132$.google.protobuf"
".UninterpretedOption*\t\010\350\007\020\200\200\200\200\002\"z\n\rMetho"
"dOptions\022\031\n\ndeprecated\030! \001(\010:\005false\022C\n\024u"
"ninterpreted_option\030\347\007 \003(\0132$.google.prot"
"obuf.UninterpretedOption*\t\010\350\007\020\200\200\200\200\002\"\236\002\n\023"
"UninterpretedOption\022;\n\004name\030\002 \003(\0132-.goog"
"le.protobuf.UninterpretedOption.NamePart"
"\022\030\n\020identifier_value\030\003 \001(\t\022\032\n\022positive_i"
"nt_value\030\004 \001(\004\022\032\n\022negative_int_value\030\005 \001"
"(\003\022\024\n\014double_value\030\006 \001(\001\022\024\n\014string_value"
"\030\007 \001(\014\022\027\n\017aggregate_value\030\010 \001(\t\0323\n\010NameP"
"art\022\021\n\tname_part\030\001 \002(\t\022\024\n\014is_extension\030\002"
" \002(\010\"\325\001\n\016SourceCodeInfo\022:\n\010location\030\001 \003("
"\0132(.google.protobuf.SourceCodeInfo.Locat"
"ion\032\206\001\n\010Location\022\020\n\004path\030\001 \003(\005B\002\020\001\022\020\n\004sp"
"an\030\002 \003(\005B\002\020\001\022\030\n\020leading_comments\030\003 \001(\t\022\031"
"\n\021trailing_comments\030\004 \001(\t\022!\n\031leading_det"
"ached_comments\030\006 \003(\tBX\n\023com.google.proto"
"bufB\020DescriptorProtosH\001Z\ndescriptor\242\002\003GP"
"B\252\002\032Google.Protobuf.Reflection", 4950);
"space\030% \001(\t\022\'\n\037javanano_use_deprecated_p"
"ackage\030& \001(\010\022C\n\024uninterpreted_option\030\347\007 "
"\003(\0132$.google.protobuf.UninterpretedOptio"
"n\":\n\014OptimizeMode\022\t\n\005SPEED\020\001\022\r\n\tCODE_SIZ"
"E\020\002\022\020\n\014LITE_RUNTIME\020\003*\t\010\350\007\020\200\200\200\200\002\"\346\001\n\016Mes"
"sageOptions\022&\n\027message_set_wire_format\030\001"
" \001(\010:\005false\022.\n\037no_standard_descriptor_ac"
"cessor\030\002 \001(\010:\005false\022\031\n\ndeprecated\030\003 \001(\010:"
"\005false\022\021\n\tmap_entry\030\007 \001(\010\022C\n\024uninterpret"
"ed_option\030\347\007 \003(\0132$.google.protobuf.Unint"
"erpretedOption*\t\010\350\007\020\200\200\200\200\002\"\230\003\n\014FieldOptio"
"ns\022:\n\005ctype\030\001 \001(\0162#.google.protobuf.Fiel"
"dOptions.CType:\006STRING\022\016\n\006packed\030\002 \001(\010\022\?"
"\n\006jstype\030\006 \001(\0162$.google.protobuf.FieldOp"
"tions.JSType:\tJS_NORMAL\022\023\n\004lazy\030\005 \001(\010:\005f"
"alse\022\031\n\ndeprecated\030\003 \001(\010:\005false\022\023\n\004weak\030"
"\n \001(\010:\005false\022C\n\024uninterpreted_option\030\347\007 "
"\003(\0132$.google.protobuf.UninterpretedOptio"
"n\"/\n\005CType\022\n\n\006STRING\020\000\022\010\n\004CORD\020\001\022\020\n\014STRI"
"NG_PIECE\020\002\"5\n\006JSType\022\r\n\tJS_NORMAL\020\000\022\r\n\tJ"
"S_STRING\020\001\022\r\n\tJS_NUMBER\020\002*\t\010\350\007\020\200\200\200\200\002\"\215\001\n"
"\013EnumOptions\022\023\n\013allow_alias\030\002 \001(\010\022\031\n\ndep"
"recated\030\003 \001(\010:\005false\022C\n\024uninterpreted_op"
"tion\030\347\007 \003(\0132$.google.protobuf.Uninterpre"
"tedOption*\t\010\350\007\020\200\200\200\200\002\"}\n\020EnumValueOptions"
"\022\031\n\ndeprecated\030\001 \001(\010:\005false\022C\n\024uninterpr"
"eted_option\030\347\007 \003(\0132$.google.protobuf.Uni"
"nterpretedOption*\t\010\350\007\020\200\200\200\200\002\"{\n\016ServiceOp"
"tions\022\031\n\ndeprecated\030! \001(\010:\005false\022C\n\024unin"
"terpreted_option\030\347\007 \003(\0132$.google.protobu"
"f.UninterpretedOption*\t\010\350\007\020\200\200\200\200\002\"z\n\rMeth"
"odOptions\022\031\n\ndeprecated\030! \001(\010:\005false\022C\n\024"
"uninterpreted_option\030\347\007 \003(\0132$.google.pro"
"tobuf.UninterpretedOption*\t\010\350\007\020\200\200\200\200\002\"\236\002\n"
"\023UninterpretedOption\022;\n\004name\030\002 \003(\0132-.goo"
"gle.protobuf.UninterpretedOption.NamePar"
"t\022\030\n\020identifier_value\030\003 \001(\t\022\032\n\022positive_"
"int_value\030\004 \001(\004\022\032\n\022negative_int_value\030\005 "
"\001(\003\022\024\n\014double_value\030\006 \001(\001\022\024\n\014string_valu"
"e\030\007 \001(\014\022\027\n\017aggregate_value\030\010 \001(\t\0323\n\010Name"
"Part\022\021\n\tname_part\030\001 \002(\t\022\024\n\014is_extension\030"
"\002 \002(\010\"\325\001\n\016SourceCodeInfo\022:\n\010location\030\001 \003"
"(\0132(.google.protobuf.SourceCodeInfo.Loca"
"tion\032\206\001\n\010Location\022\020\n\004path\030\001 \003(\005B\002\020\001\022\020\n\004s"
"pan\030\002 \003(\005B\002\020\001\022\030\n\020leading_comments\030\003 \001(\t\022"
"\031\n\021trailing_comments\030\004 \001(\t\022!\n\031leading_de"
"tached_comments\030\006 \003(\tB[\n\023com.google.prot"
"obufB\020DescriptorProtosH\001Z\ndescriptor\242\002\003G"
"PB\252\002\032Google.Protobuf.Reflection\260\002\001", 4994);
::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
"google/protobuf/descriptor.proto", &protobuf_RegisterTypes);
FileDescriptorSet::default_instance_ = new FileDescriptorSet();
@ -7597,6 +7599,7 @@ const int FileOptions::kDeprecatedFieldNumber;
const int FileOptions::kCcEnableArenasFieldNumber;
const int FileOptions::kObjcClassPrefixFieldNumber;
const int FileOptions::kCsharpNamespaceFieldNumber;
const int FileOptions::kJavananoUseDeprecatedPackageFieldNumber;
const int FileOptions::kUninterpretedOptionFieldNumber;
#endif // !_MSC_VER
@ -7634,6 +7637,7 @@ void FileOptions::SharedCtor() {
cc_enable_arenas_ = false;
objc_class_prefix_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
csharp_namespace_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
javanano_use_deprecated_package_ = false;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
@ -7700,8 +7704,8 @@ void FileOptions::Clear() {
go_package_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
}
if (_has_bits_[8 / 32] & 16128u) {
ZR_(java_generic_services_, cc_enable_arenas_);
if (_has_bits_[8 / 32] & 32512u) {
ZR_(java_generic_services_, javanano_use_deprecated_package_);
if (has_objc_class_prefix()) {
objc_class_prefix_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
@ -7950,6 +7954,21 @@ bool FileOptions::MergePartialFromCodedStream(
} else {
goto handle_unusual;
}
if (input->ExpectTag(304)) goto parse_javanano_use_deprecated_package;
break;
}
// optional bool javanano_use_deprecated_package = 38;
case 38: {
if (tag == 304) {
parse_javanano_use_deprecated_package:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
input, &javanano_use_deprecated_package_)));
set_has_javanano_use_deprecated_package();
} else {
goto handle_unusual;
}
if (input->ExpectTag(7994)) goto parse_uninterpreted_option;
break;
}
@ -8097,6 +8116,11 @@ void FileOptions::SerializeWithCachedSizes(
37, this->csharp_namespace(), output);
}
// optional bool javanano_use_deprecated_package = 38;
if (has_javanano_use_deprecated_package()) {
::google::protobuf::internal::WireFormatLite::WriteBool(38, this->javanano_use_deprecated_package(), output);
}
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
for (unsigned int i = 0, n = this->uninterpreted_option_size(); i < n; i++) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
@ -8218,6 +8242,11 @@ void FileOptions::SerializeWithCachedSizes(
37, this->csharp_namespace(), target);
}
// optional bool javanano_use_deprecated_package = 38;
if (has_javanano_use_deprecated_package()) {
target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(38, this->javanano_use_deprecated_package(), target);
}
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
for (unsigned int i = 0, n = this->uninterpreted_option_size(); i < n; i++) {
target = ::google::protobuf::internal::WireFormatLite::
@ -8289,7 +8318,7 @@ int FileOptions::ByteSize() const {
}
}
if (_has_bits_[8 / 32] & 16128u) {
if (_has_bits_[8 / 32] & 32512u) {
// optional bool java_generic_services = 17 [default = false];
if (has_java_generic_services()) {
total_size += 2 + 1;
@ -8324,6 +8353,11 @@ int FileOptions::ByteSize() const {
this->csharp_namespace());
}
// optional bool javanano_use_deprecated_package = 38;
if (has_javanano_use_deprecated_package()) {
total_size += 2 + 1;
}
}
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
total_size += 2 * this->uninterpreted_option_size();
@ -8411,6 +8445,9 @@ void FileOptions::MergeFrom(const FileOptions& from) {
set_has_csharp_namespace();
csharp_namespace_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.csharp_namespace_);
}
if (from.has_javanano_use_deprecated_package()) {
set_javanano_use_deprecated_package(from.javanano_use_deprecated_package());
}
}
_extensions_.MergeFrom(from._extensions_);
if (from._internal_metadata_.have_unknown_fields()) {
@ -8456,6 +8493,7 @@ void FileOptions::InternalSwap(FileOptions* other) {
std::swap(cc_enable_arenas_, other->cc_enable_arenas_);
objc_class_prefix_.Swap(&other->objc_class_prefix_);
csharp_namespace_.Swap(&other->csharp_namespace_);
std::swap(javanano_use_deprecated_package_, other->javanano_use_deprecated_package_);
uninterpreted_option_.UnsafeArenaSwap(&other->uninterpreted_option_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_internal_metadata_.Swap(&other->_internal_metadata_);
@ -8956,6 +8994,30 @@ void FileOptions::clear_csharp_namespace() {
// @@protoc_insertion_point(field_set_allocated:google.protobuf.FileOptions.csharp_namespace)
}
// optional bool javanano_use_deprecated_package = 38;
bool FileOptions::has_javanano_use_deprecated_package() const {
return (_has_bits_[0] & 0x00004000u) != 0;
}
void FileOptions::set_has_javanano_use_deprecated_package() {
_has_bits_[0] |= 0x00004000u;
}
void FileOptions::clear_has_javanano_use_deprecated_package() {
_has_bits_[0] &= ~0x00004000u;
}
void FileOptions::clear_javanano_use_deprecated_package() {
javanano_use_deprecated_package_ = false;
clear_has_javanano_use_deprecated_package();
}
bool FileOptions::javanano_use_deprecated_package() const {
// @@protoc_insertion_point(field_get:google.protobuf.FileOptions.javanano_use_deprecated_package)
return javanano_use_deprecated_package_;
}
void FileOptions::set_javanano_use_deprecated_package(bool value) {
set_has_javanano_use_deprecated_package();
javanano_use_deprecated_package_ = value;
// @@protoc_insertion_point(field_set:google.protobuf.FileOptions.javanano_use_deprecated_package)
}
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
int FileOptions::uninterpreted_option_size() const {
return uninterpreted_option_.size();

@ -2000,6 +2000,13 @@ class LIBPROTOBUF_EXPORT FileOptions : public ::google::protobuf::Message {
::std::string* release_csharp_namespace();
void set_allocated_csharp_namespace(::std::string* csharp_namespace);
// optional bool javanano_use_deprecated_package = 38;
bool has_javanano_use_deprecated_package() const;
void clear_javanano_use_deprecated_package();
static const int kJavananoUseDeprecatedPackageFieldNumber = 38;
bool javanano_use_deprecated_package() const;
void set_javanano_use_deprecated_package(bool value);
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
int uninterpreted_option_size() const;
void clear_uninterpreted_option();
@ -2043,6 +2050,8 @@ class LIBPROTOBUF_EXPORT FileOptions : public ::google::protobuf::Message {
inline void clear_has_objc_class_prefix();
inline void set_has_csharp_namespace();
inline void clear_has_csharp_namespace();
inline void set_has_javanano_use_deprecated_package();
inline void clear_has_javanano_use_deprecated_package();
::google::protobuf::internal::ExtensionSet _extensions_;
@ -2057,13 +2066,14 @@ class LIBPROTOBUF_EXPORT FileOptions : public ::google::protobuf::Message {
bool cc_generic_services_;
int optimize_for_;
::google::protobuf::internal::ArenaStringPtr go_package_;
::google::protobuf::internal::ArenaStringPtr objc_class_prefix_;
::google::protobuf::internal::ArenaStringPtr csharp_namespace_;
::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption > uninterpreted_option_;
bool java_generic_services_;
bool py_generic_services_;
bool deprecated_;
bool cc_enable_arenas_;
bool javanano_use_deprecated_package_;
::google::protobuf::internal::ArenaStringPtr objc_class_prefix_;
::google::protobuf::internal::ArenaStringPtr csharp_namespace_;
::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption > uninterpreted_option_;
friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
friend void protobuf_AssignDesc_google_2fprotobuf_2fdescriptor_2eproto();
friend void protobuf_ShutdownFile_google_2fprotobuf_2fdescriptor_2eproto();
@ -5892,6 +5902,30 @@ inline void FileOptions::set_allocated_csharp_namespace(::std::string* csharp_na
// @@protoc_insertion_point(field_set_allocated:google.protobuf.FileOptions.csharp_namespace)
}
// optional bool javanano_use_deprecated_package = 38;
inline bool FileOptions::has_javanano_use_deprecated_package() const {
return (_has_bits_[0] & 0x00004000u) != 0;
}
inline void FileOptions::set_has_javanano_use_deprecated_package() {
_has_bits_[0] |= 0x00004000u;
}
inline void FileOptions::clear_has_javanano_use_deprecated_package() {
_has_bits_[0] &= ~0x00004000u;
}
inline void FileOptions::clear_javanano_use_deprecated_package() {
javanano_use_deprecated_package_ = false;
clear_has_javanano_use_deprecated_package();
}
inline bool FileOptions::javanano_use_deprecated_package() const {
// @@protoc_insertion_point(field_get:google.protobuf.FileOptions.javanano_use_deprecated_package)
return javanano_use_deprecated_package_;
}
inline void FileOptions::set_javanano_use_deprecated_package(bool value) {
set_has_javanano_use_deprecated_package();
javanano_use_deprecated_package_ = value;
// @@protoc_insertion_point(field_set:google.protobuf.FileOptions.javanano_use_deprecated_package)
}
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
inline int FileOptions::uninterpreted_option_size() const {
return uninterpreted_option_.size();

@ -42,6 +42,7 @@ syntax = "proto2";
package google.protobuf;
option go_package = "descriptor";
option java_package = "com.google.protobuf";
option javanano_use_deprecated_package = true;
option java_outer_classname = "DescriptorProtos";
option csharp_namespace = "Google.Protobuf.Reflection";
option objc_class_prefix = "GPB";
@ -369,6 +370,10 @@ message FileOptions {
// Namespace for generated classes; defaults to the package.
optional string csharp_namespace = 37;
// Whether the nano proto compiler should generate in the deprecated non-nano
// suffixed package.
optional bool javanano_use_deprecated_package = 38;
// The parser stores options it doesn't recognize here. See above.
repeated UninterpretedOption uninterpreted_option = 999;

@ -82,9 +82,9 @@ void protobuf_AddDesc_google_2fprotobuf_2fduration_2eproto() {
::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
"\n\036google/protobuf/duration.proto\022\017google"
".protobuf\"*\n\010Duration\022\017\n\007seconds\030\001 \001(\003\022\r"
"\n\005nanos\030\002 \001(\005BA\n\023com.google.protobufB\rDu"
"rationProtoP\001\240\001\001\242\002\003GPB\252\002\017Google.Protobuf"
"b\006proto3", 168);
"\n\005nanos\030\002 \001(\005BP\n\023com.google.protobufB\rDu"
"rationProtoP\001\240\001\001\242\002\003GPB\252\002\036Google.Protobuf"
".WellKnownTypesb\006proto3", 183);
::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
"google/protobuf/duration.proto", &protobuf_RegisterTypes);
Duration::default_instance_ = new Duration();

@ -79,8 +79,9 @@ void protobuf_AddDesc_google_2fprotobuf_2fempty_2eproto() {
::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
"\n\033google/protobuf/empty.proto\022\017google.pr"
"otobuf\"\007\n\005EmptyB)\n\023com.google.protobufB\n"
"EmptyProtoP\001\242\002\003GPBb\006proto3", 106);
"otobuf\"\007\n\005EmptyBJ\n\023com.google.protobufB\n"
"EmptyProtoP\001\242\002\003GPB\252\002\036Google.Protobuf.Wel"
"lKnownTypesb\006proto3", 139);
::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
"google/protobuf/empty.proto", &protobuf_RegisterTypes);
Empty::default_instance_ = new Empty();

@ -81,8 +81,9 @@ void protobuf_AddDesc_google_2fprotobuf_2ffield_5fmask_2eproto() {
::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
"\n google/protobuf/field_mask.proto\022\017goog"
"le.protobuf\"\032\n\tFieldMask\022\r\n\005paths\030\001 \003(\tB"
"\?\n\023com.google.protobufB\016FieldMaskProtoP\001"
"\242\002\003GPB\252\002\017Google.Protobufb\006proto3", 152);
"N\n\023com.google.protobufB\016FieldMaskProtoP\001"
"\242\002\003GPB\252\002\036Google.Protobuf.WellKnownTypesb"
"\006proto3", 167);
::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
"google/protobuf/field_mask.proto", &protobuf_RegisterTypes);
FieldMask::default_instance_ = new FieldMask();

@ -81,8 +81,9 @@ void protobuf_AddDesc_google_2fprotobuf_2fsource_5fcontext_2eproto() {
::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
"\n$google/protobuf/source_context.proto\022\017"
"google.protobuf\"\"\n\rSourceContext\022\021\n\tfile"
"_name\030\001 \001(\tB1\n\023com.google.protobufB\022Sour"
"ceContextProtoP\001\242\002\003GPBb\006proto3", 150);
"_name\030\001 \001(\tBR\n\023com.google.protobufB\022Sour"
"ceContextProtoP\001\242\002\003GPB\252\002\036Google.Protobuf"
".WellKnownTypesb\006proto3", 183);
::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
"google/protobuf/source_context.proto", &protobuf_RegisterTypes);
SourceContext::default_instance_ = new SourceContext();

@ -165,9 +165,9 @@ void protobuf_AddDesc_google_2fprotobuf_2fstruct_2eproto() {
"\000\0220\n\nlist_value\030\006 \001(\0132\032.google.protobuf."
"ListValueH\000B\006\n\004kind\"3\n\tListValue\022&\n\006valu"
"es\030\001 \003(\0132\026.google.protobuf.Value*\033\n\tNull"
"Value\022\016\n\nNULL_VALUE\020\000B\?\n\023com.google.prot"
"obufB\013StructProtoP\001\240\001\001\242\002\003GPB\252\002\017Google.Pr"
"otobufb\006proto3", 574);
"Value\022\016\n\nNULL_VALUE\020\000BN\n\023com.google.prot"
"obufB\013StructProtoP\001\240\001\001\242\002\003GPB\252\002\036Google.Pr"
"otobuf.WellKnownTypesb\006proto3", 589);
::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
"google/protobuf/struct.proto", &protobuf_RegisterTypes);
Struct::default_instance_ = new Struct();

@ -82,9 +82,9 @@ void protobuf_AddDesc_google_2fprotobuf_2ftimestamp_2eproto() {
::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
"\n\037google/protobuf/timestamp.proto\022\017googl"
"e.protobuf\"+\n\tTimestamp\022\017\n\007seconds\030\001 \001(\003"
"\022\r\n\005nanos\030\002 \001(\005BB\n\023com.google.protobufB\016"
"TimestampProtoP\001\240\001\001\242\002\003GPB\252\002\017Google.Proto"
"bufb\006proto3", 171);
"\022\r\n\005nanos\030\002 \001(\005BQ\n\023com.google.protobufB\016"
"TimestampProtoP\001\240\001\001\242\002\003GPB\252\002\036Google.Proto"
"buf.WellKnownTypesb\006proto3", 186);
::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
"google/protobuf/timestamp.proto", &protobuf_RegisterTypes);
Timestamp::default_instance_ = new Timestamp();

@ -221,9 +221,9 @@ void protobuf_AddDesc_google_2fprotobuf_2ftype_2eproto() {
"ntext\"S\n\tEnumValue\022\014\n\004name\030\001 \001(\t\022\016\n\006numb"
"er\030\002 \001(\005\022(\n\007options\030\003 \003(\0132\027.google.proto"
"buf.Option\";\n\006Option\022\014\n\004name\030\001 \001(\t\022#\n\005va"
"lue\030\002 \001(\0132\024.google.protobuf.AnyB(\n\023com.g"
"oogle.protobufB\tTypeProtoP\001\242\002\003GPBb\006proto"
"3", 1321);
"lue\030\002 \001(\0132\024.google.protobuf.AnyBI\n\023com.g"
"oogle.protobufB\tTypeProtoP\001\242\002\003GPB\252\002\036Goog"
"le.Protobuf.WellKnownTypesb\006proto3", 1354);
::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
"google/protobuf/type.proto", &protobuf_RegisterTypes);
Type::default_instance_ = new Type();

@ -262,9 +262,9 @@ void protobuf_AddDesc_google_2fprotobuf_2fwrappers_2eproto() {
"e\030\001 \001(\004\"\033\n\nInt32Value\022\r\n\005value\030\001 \001(\005\"\034\n\013"
"UInt32Value\022\r\n\005value\030\001 \001(\r\"\032\n\tBoolValue\022"
"\r\n\005value\030\001 \001(\010\"\034\n\013StringValue\022\r\n\005value\030\001"
" \001(\t\"\033\n\nBytesValue\022\r\n\005value\030\001 \001(\014B>\n\023com"
" \001(\t\"\033\n\nBytesValue\022\r\n\005value\030\001 \001(\014BM\n\023com"
".google.protobufB\rWrappersProtoP\001\242\002\003GPB\252"
"\002\017Google.Protobufb\006proto3", 385);
"\002\036Google.Protobuf.WellKnownTypesb\006proto3", 400);
::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
"google/protobuf/wrappers.proto", &protobuf_RegisterTypes);
DoubleValue::default_instance_ = new DoubleValue();

Loading…
Cancel
Save