aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/google/protobuf/compiler/javanano/javanano_params.h
Commit message (Collapse)AuthorAge
* Remove javanano.Gravatar Feng Xiao2018-03-26
|
* Add std:: namespace prefix to set and map (#3332)Gravatar tanderson-google2017-07-09
| | | * Remove using std::{set,map}
* Generate @IntDef annotations for nanoproto enums.Gravatar Jeff Davidson2015-04-28
| | | | | | | | | | @IntDef is a support library annotation which allows build tools to determine the valid set of values for a given integer field when that field is intended to be restricted like an enum. This avoids the overhead of enums while still allowing for compile-time type checking in most circumstances. Change-Id: Iee02e0b49a8e069f6456572f538e0a0d301fdfd5
* Add clone() method support for nano.Gravatar Brian Duff2015-04-28
| | | | | | Upstreamed from Another Place (cr/57247854). Change-Id: I2aaf59544c0f5ae21a51891d8a5eeda1dc722c90
* Change reftypes_primitive_enums to reftypes_compat_mode.Gravatar Brian Duff2014-10-01
| | | | | | Make the clear() method stripped in reftypes_compat_mode. Change-Id: I0ec35537856f59a6ecf231bfd74df995c858e2b2
* Adds a primitive enum mode for reftypes.Gravatar Brian Duff2014-09-30
| | | | | | This is a compatibility shim. Change-Id: Ia0b417d4621e391ede618d0b3b1c470c9896e0ff
* Support generation of Parcelable nano messages.Gravatar Jeff Davidson2014-04-25
| | | | | | | | | | | | | | | | | | | | This CL adds the "parcelable_messages" option. When enabled, all generated message classes will conform to the Android Parcelable contract. This is achieved by introducing a new parent class for generated classes which implements the required functionality. Since the store_unknown_fields option also makes use of a superclass, ExtendableMessageNano, we have two versions of the new Parcelable superclass: one extending MessageNano, and one extending ExtendableMessageNano. These classes are otherwise identical. As these classes depend on Android framework jars, they are not included in the host .jar build of the nanoproto library. Finally, add a test suite for running tests of Android-specific functionality, as this cannot be done on a desktop JVM. Change-Id: Icc2a257f03317e947f7078dbb9857c3286857497
* Adds --ignore_service nano proto compiler flagGravatar Jie Dai2014-04-23
| | | | | | | | Nano proto compiler normally throws an error if any service is defined. If --ignore-services=true is set, no error is thrown and the service is simply skipped. Change-Id: Id82583555085cc55550d03a485d3f0189885240b
* Implement hashCode() and equals() behind a generator option.Gravatar Brian Duff2013-10-25
| | | | | | | | | | | | | | | | The option is only called 'generate_equals' because: - equals() is the main thing; hashCode() is there only to complement equals(); - it's shorter; - toString() should not be included in this option because it's more for debugging and it's more likely to stop ProGuard from working well. Also shortened the "has bit" expression; was ((bitField & mask) == mask), now ((bitField & mask) != 0). Both the Java code and the bytecode are slightly shorter. Change-Id: Ic309a08a60883bf454eb6612679aa99611620e76
* Add reftypes field generator option.Gravatar Brian Duff2013-10-07
| | | | | | | | This option generates fields as reference types, and serializes based on nullness. Change-Id: Ic32e0eebff59d14016cc9a19e15a9bb08ae0bba5 Signed-off-by: Brian Duff <bduff@google.com>
* Add two codegen parameters to nano.Gravatar Max Cai2013-09-18
| | | | | | | | | | | | | | | enum_style = c | java: 'c' to put the enum member int constants at the parent scope; 'java' to create uninstantiatable shell classes at the parent scope and put the int constants inside. optional_field_style = default | accessors: 'default' to create one public mutable field per optional proto field; 'accessors' to encapsulate the generated fields behind get, set, has and clear accessors. This CL only contains parsing code for these two parameters. Change-Id: Iec0c3b0f30af8eb7db328e790664306bc90be089
* Add an option to inspect "has" state upon parse.Gravatar Ulas Kirazci2013-07-29
| | | | | | If has is set, also always serialize. Change-Id: I2c8450f7ab9e837d722123dd1042991c0258ede3
* Per-file java_multiple_files flag.Gravatar Max Cai2013-07-25
| | | | | | | | | | | | | | | 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
* Nano support for extensions and unknown fields.Gravatar Brian Duff2013-06-24
| | | | | | | | | | | | | | | | | | | | You can use the processor option store_unknown_fields to switch this support on: aprotoc --javanano_out=store_unknown_fields=true:/tmp/out A separate option for extensions isn't required. Support for unknown fields must be turned on to allow storing and retrieving extensions, because they are just stored as unknown fields. If unknown fields are switched on, extension related code will be generated when a proto message includes an extension range, or an extension is encountered. By default, store_unknown_fields is false. No additional code is generated, and the generator will error out if protos contain extension ranges or extensions. Change-Id: I1e034c9e8f3305612953f72438189a7da6ed2167
* Nano protobufs.Gravatar Ulas Kirazci2013-04-01
Like micro protobufs except: - No setter/getter/hazzer functions. - Has state is not available. Outputs all fields != their default. - CodedInputStream can only take byte[] (not InputStream). - Repeated fields are in arrays, not ArrayList or Vector. - Unset messages/groups are null, not "defaultInstance()". - Required fields are always serialized. To use: - Link libprotobuf-java-2.3.0-nano runtime. - Use LOCAL_PROTOC_OPTIMIZE_TYPE := nano Change-Id: I7429015b3c5f7f38b7be01eb2d4927f7a9999c80