History log of /external/protobuf/src/google/protobuf/compiler/javanano/javanano_params.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
721ea491a8e3e9ea5a130965dc5761fc335c3e61 23-Apr-2014 Jeff Davidson <jpd@google.com> Support generation of Parcelable nano messages.

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
/external/protobuf/src/google/protobuf/compiler/javanano/javanano_params.h
a0a4f14521bd29a472d51fb7c4c5c45a82643453 21-Apr-2014 Jie Dai <jied@google.com> Adds --ignore_service nano proto compiler flag

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
/external/protobuf/src/google/protobuf/compiler/javanano/javanano_params.h
ccc48faf20dbf3b3cddcffe78d198876d543529b 16-Oct-2013 Brian Duff <bduff@google.com> Implement hashCode() and equals() behind a generator option.

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
/external/protobuf/src/google/protobuf/compiler/javanano/javanano_params.h
0b8579237336f221711a0aac42400eb31a58fed3 01-Oct-2013 Brian Duff <bduff@google.com> Add reftypes field generator option.

This option generates fields as reference types, and serializes
based on nullness.

Change-Id: Ic32e0eebff59d14016cc9a19e15a9bb08ae0bba5
Signed-off-by: Brian Duff <bduff@google.com>
/external/protobuf/src/google/protobuf/compiler/javanano/javanano_params.h
26ce449901aa8c2f954fb4a5e8bbcc1253b3ca01 18-Sep-2013 Max Cai <maxtroy@google.com> Add two codegen parameters to nano.

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
/external/protobuf/src/google/protobuf/compiler/javanano/javanano_params.h
35d9fd84ff1d9ecdb91156b757cc9fdcc3f25249 01-Apr-2013 Ulas Kirazci <ulas@google.com> Add an option to inspect "has" state upon parse.

If has is set, also always serialize.

Change-Id: I2c8450f7ab9e837d722123dd1042991c0258ede3
/external/protobuf/src/google/protobuf/compiler/javanano/javanano_params.h
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
/external/protobuf/src/google/protobuf/compiler/javanano/javanano_params.h
0e055f079f53b07de3705838a7b4742ce56839f8 19-Jun-2013 Brian Duff <bduff@google.com> Nano support for extensions and unknown fields.

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
/external/protobuf/src/google/protobuf/compiler/javanano/javanano_params.h
64d8d8f89050c5ada85341f967af391f4716a7cb 15-Mar-2013 Ulas Kirazci <ulas@google.com> Nano protobufs.

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
/external/protobuf/src/google/protobuf/compiler/javanano/javanano_params.h