diff options
author | Jisi Liu <liujisi@google.com> | 2015-04-29 10:44:35 -0700 |
---|---|---|
committer | Jisi Liu <liujisi@google.com> | 2015-04-29 10:44:35 -0700 |
commit | 0e122ce8c591e748e9cda83f1ccf115359a1b0d7 (patch) | |
tree | 26ced9365c1b9aef3203380f5c0ae92170e364f4 /javanano/README.md | |
parent | 5a9863b5841cff1581a367d75d549831f1252b5a (diff) | |
parent | 9d546c85bda48c59ba10e240afbf731bd0775bc4 (diff) | |
download | protobuf-0e122ce8c591e748e9cda83f1ccf115359a1b0d7.tar.gz protobuf-0e122ce8c591e748e9cda83f1ccf115359a1b0d7.tar.bz2 protobuf-0e122ce8c591e748e9cda83f1ccf115359a1b0d7.zip |
Merge pull request #315 from brianduff/sync_from_aosp
Sync nanoproto from AOSP
Diffstat (limited to 'javanano/README.md')
-rw-r--r-- | javanano/README.md | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/javanano/README.md b/javanano/README.md index 7d696aa7..e19b90b1 100644 --- a/javanano/README.md +++ b/javanano/README.md @@ -145,6 +145,7 @@ optional_field_style -> default or accessors enum_style -> c or java ignore_services -> true or false parcelable_messages -> true or false +generate_intdefs -> true or false ``` **java_package=\<file-name\>|\<package-name\>** (no default) @@ -302,6 +303,28 @@ parcelable_messages -> true or false Android-specific option to generate Parcelable messages. +**generate_intdefs={true,false}** (default: false) + Android-specific option to generate @IntDef annotations for enums. + + If turned on, an '@IntDef' annotation (a public @interface) will be + generated for each enum, and every integer parameter and return + value in the generated code meant for this enum will be annotated + with it. This interface is generated with the same name and at the + same place as the enum members' container interfaces described + above under 'enum_style=java', regardless of the enum_style option + used. When this is combined with enum_style=java, the interface + will be both the '@IntDef' annotation and the container of the enum + members; otherwise the interface has an empty body. + + Your app must declare a compile-time dependency on the + android-support-annotations library. + + For more information on how these @IntDef annotations help with + compile-time type safety, see: + https://sites.google.com/a/android.com/tools/tech-docs/support-annotations + and + https://developer.android.com/reference/android/support/annotation/IntDef.html + To use nano protobufs within the Android repo: ---------------------------------------------- |