diff options
author | Andrew Flynn <flynn@google.com> | 2013-12-04 13:10:07 -0800 |
---|---|---|
committer | Andrew Flynn <flynn@google.com> | 2013-12-09 11:40:03 -0800 |
commit | c997c136bbd5a4f7131d21a3f8c45e563fa5cca5 (patch) | |
tree | 350188aebfbd906e16b993f3e33e38c3b36681a0 /java/README.txt | |
parent | 2d2557ea706f1da104a8d8fc592177d21852d7ce (diff) | |
download | protobuf-c997c136bbd5a4f7131d21a3f8c45e563fa5cca5.tar.gz protobuf-c997c136bbd5a4f7131d21a3f8c45e563fa5cca5.tar.bz2 protobuf-c997c136bbd5a4f7131d21a3f8c45e563fa5cca5.zip |
Nano: don't generate accessor methods for nested methods
For nested message objects, don't generate accessor methods because they have
a default value that is not a valid value (null), so there is no reason to have
get/set/has/clear methods for them. Clients and protos (while serializing) can
check against the invalid value to see if it's been set.
Change-Id: Ic63400889581271b8cbcd9c45c84519d4921fd4b
Diffstat (limited to 'java/README.txt')
-rw-r--r-- | java/README.txt | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/java/README.txt b/java/README.txt index 976ec842..ced78d23 100644 --- a/java/README.txt +++ b/java/README.txt @@ -507,9 +507,9 @@ optional_field_style={default,accessors,reftypes} (default: default) useful when you need to serialize a field with the default value, or check if a field has been explicitly set to its default value from the wire. - In the 'accessors' style, required fields are still translated to one - public mutable Java field each, and repeated fields are still translated - to arrays. No accessors are generated for them. + In the 'accessors' style, required and nested message fields are still + translated to one public mutable Java field each, repeated fields are still + translated to arrays. No accessors are generated for them. IMPORTANT: When using the 'accessors' style, ProGuard should always be enabled with optimization (don't use -dontoptimize) and allowing |