624c448fbef20a1a2fad2289f622b468c25763d1 |
29-Jul-2013 |
Max Cai <maxtroy@google.com> |
Fix outer classname for javamicro/javanano. - File class name is defined as the java_outer_classname option value or the file name ToCamelCase; never the single message's ClassName. - File-scope enums are translated to constants in the file class, regardless of java_multiple_files. - If java_multiple_files=true, and file's class name equals a message's class name, no error. This is done by detecting that the outer class is not needed and skipping the outer class codegen and clash checks. Note: there is a disparity between java[lite] and the previous java{micr|nan}o: when generating code for a single-message proto, the outer class is omitted by java{micr|nan}o if the file does not have java_outer_classname. This change makes java{micr|nan}o align with java[lite] codegen and create the outer class, but will print some info to warn of potential change of code. - Also fixed the "is_own_file" detection and made all parseX() methods static. Previously, all messages in a java_multiple_files=true file are (incorrectly) considered to be in their own files, including nested messages, causing them to become inner classes (instance- bound) and forcing the parseX() methods to lose the static modifier. - This change supersedes c/60164 and c/60086, which causes javanano to put enum values into enum shell classes if java_multiple_files=true. We now always use the parent class to host the enum values. A future change will add a command line option to provide more flexibility. - Elaborated in java/README.txt. Change-Id: I684932f90e0a028ef37c662b221def5ffa202439
avamicro_file.cc
avamicro_generator.cc
avamicro_helpers.cc
avamicro_helpers.h
avamicro_message.cc
|
8170787391efcb6cc6a8babc1cce35d5b1aff420 |
24-Jul-2013 |
Max Cai <maxtroy@google.com> |
Per-file java_multiple_files flag. Imported source files may have different values for the 'java_multiple_files' option to the main source file's. Whether the fully qualified Java name of an entity should include the outer class name depends on the flag value in the file defining the referenced entity, not the main file. This CL loads the flag values from the main and all transitively imported files into the params, and generates the fully qualified Java names accordingly. If the generator option 'java_multiple_files' is set, its value overrides any in-file values in all source/imported files. This is because this generator option is typically used on either none or all source files. Change-Id: Id6a4a42426d68961dc669487d38f35530deb7d8e
avamicro_file.cc
avamicro_generator.cc
avamicro_helpers.cc
avamicro_message.cc
avamicro_params.h
|
0f2ca89132ab81441f7eb351c7a053a8c8d9d1c3 |
22-Jul-2013 |
Chris Smith <cjs@google.com> |
Allow NaN/+inf/-inf defaults in micro/nano. Adds support for default values of NaN, infinity and negative infinity for floats and doubles in both the nano and micro java compiler. Change-Id: Ibc43e5ebb073e51d9a8181f3aa23b72e10015dca
avamicro_helpers.cc
|
25b5a76155860b450c1176684f8e6007aab8aa7b |
27-Jun-2012 |
Andy Stadler <stadler@google.com> |
Generate "modern" java to reduce warnings * @SuppressWarnings("hiding") for field names that are reused in inner classes. * @Override for methods defined in com.google.protobuf.micro.MessageMicro * Removed unnecessary type casting * Only throw exception from writeTo when there are fields to write. This removes over 1,000 warnings from the Play client. Change-Id: I9049c94f1e6aec5e5547898defc03c8d379c3c10
avamicro_message.cc
|
1b639e09d77de609bed080f5d2ca88d72ba42559 |
08-Jun-2010 |
Wink Saville <wink@google.com> |
Changed speed optimization for strings. Removed use of StringUtf8Micro and instead use an extra byte array instance variable directly in the class. This allows the list returned for repeated strings to be a String instead of a StringUtf8Micro making the class compatible with existing code. Removed PerfTimer.java which isn't used. Change-Id: Ie6acfb40f98f59a48c1a795d86f715078f9611f5
avamicro_primitive_field.cc
|
66663e974c1d66250e51f5008bce5590464bbe9a |
03-Jun-2010 |
Wink Saville <wink@google.com> |
Fix bug in generating enum class name. I was not properly constructing the enum class name if there was a period in the protobuf package name. Change-Id: I71e51d9745702fa89841ad714282afe8b42a3425
avamicro_helpers.cc
|
e2d542951c059563a3b7f74c257dac4f222d9dc5 |
29-May-2010 |
Wink Saville <wink@google.com> |
Add support for Java micro protobuf's to protobuf-2.3.0. See README.android for additional information. Change-Id: I6693e405c0d651eacacd3227a876129865dd0d3c
avamicro_enum.cc
avamicro_enum.h
avamicro_enum_field.cc
avamicro_enum_field.h
avamicro_field.cc
avamicro_field.h
avamicro_file.cc
avamicro_file.h
avamicro_generator.cc
avamicro_generator.h
avamicro_helpers.cc
avamicro_helpers.h
avamicro_message.cc
avamicro_message.h
avamicro_message_field.cc
avamicro_message_field.h
avamicro_params.h
avamicro_primitive_field.cc
avamicro_primitive_field.h
|
d0332953cda33fb4f8e24ebff9c49159b69c43d6 |
29-May-2010 |
Wink Saville <wink@google.com> |
Add protobuf 2.3.0 sources This is the contents of protobuf-2.3.0.tar.bz2 from http://code.google.com/p/protobuf/downloads/list. Change-Id: Idfde09ce7ef5ac027b07ee83f2674fbbed5c30b2
avamicro_enum.cc
avamicro_enum.h
avamicro_enum_field.cc
avamicro_enum_field.h
avamicro_field.cc
avamicro_field.h
avamicro_file.cc
avamicro_file.h
avamicro_generator.cc
avamicro_generator.h
avamicro_helpers.cc
avamicro_helpers.h
avamicro_message.cc
avamicro_message.h
avamicro_message_field.cc
avamicro_message_field.h
avamicro_params.h
avamicro_primitive_field.cc
avamicro_primitive_field.h
|
ede38fe9b9f93888e6e41afc7abb09525f44da95 |
28-May-2010 |
Wink Saville <wink@google.com> |
Add support for Java micro protobuf's to protobuf-2.2.0a. See README.android for additional information. Change-Id: I9c5ef2eec484cc87e32841f39060f8f27b8e8472
avamicro_enum.cc
avamicro_enum.h
avamicro_enum_field.cc
avamicro_enum_field.h
avamicro_field.cc
avamicro_field.h
avamicro_file.cc
avamicro_file.h
avamicro_generator.cc
avamicro_generator.h
avamicro_helpers.cc
avamicro_helpers.h
avamicro_message.cc
avamicro_message.h
avamicro_message_field.cc
avamicro_message_field.h
avamicro_params.h
avamicro_primitive_field.cc
avamicro_primitive_field.h
|