aboutsummaryrefslogtreecommitdiff
path: root/java/README.txt
diff options
context:
space:
mode:
authorMax Cai <maxtroy@google.com>2013-09-24 17:40:37 +0100
committerMax Cai <maxtroy@google.com>2013-09-25 19:44:27 +0100
commit1479c7ab1b72346df56b95816a58234ba2ceb9cd (patch)
tree35f29c2fab71ccb576c1226644ce7f64914beb6b /java/README.txt
parentb337f25628ceb3649df5c4e89b5125e7698a9b47 (diff)
downloadprotobuf-1479c7ab1b72346df56b95816a58234ba2ceb9cd.tar.gz
protobuf-1479c7ab1b72346df56b95816a58234ba2ceb9cd.tar.bz2
protobuf-1479c7ab1b72346df56b95816a58234ba2ceb9cd.zip
Implement enum_style=java option.
This javanano_out command line option creates a container interface at the normal place where the enum constants would reside, per enum definition. The java_multiple_files flag would now affect the file- scope enums with the shells. If the flag is true then file-scope container interfaces are created in their own files. Change-Id: Id52258fcff8d3dee9db8f3d8022147a811bf3565
Diffstat (limited to 'java/README.txt')
-rw-r--r--java/README.txt17
1 files changed, 13 insertions, 4 deletions
diff --git a/java/README.txt b/java/README.txt
index 9728f48e..e2e698e1 100644
--- a/java/README.txt
+++ b/java/README.txt
@@ -93,8 +93,9 @@ Micro version
The runtime and generated code for MICRO_RUNTIME is smaller
because it does not include support for the descriptor and
reflection, and enums are generated as integer constants in
-the parent message or the file's outer class. Also, not
-currently supported are packed repeated elements or
+the parent message or the file's outer class, with no
+protection against invalid values set to enum fields. Also,
+not currently supported are packed repeated elements or
extensions.
To create a jar file for the runtime and run tests invoke
@@ -409,12 +410,20 @@ Nano version
============================
Nano is even smaller than micro, especially in the number of generated
-functions. It is like micro except:
+functions. It is like micro:
+
+- No support for descriptors and reflection;
+- Enum constants are integers with no protection against invalid
+ values set to enum fields.
+
+Except:
- Setter/getter/hazzer/clearer functions are opt-in.
- If not opted in, has state is not available. Serialization outputs
- all fields not equal to their default. (See important implications
+ all fields not equal to their default. (See important implications
below.)
+- Enum constants can be generated into container interfaces bearing
+ the enum's name (so the referencing code is in Java style).
- CodedInputStreamMicro is renamed to CodedInputByteBufferNano and can
only take byte[] (not InputStream).
- Similar rename from CodedOutputStreamMicro to