diff options
author | Feng Xiao <xfxyjwf@gmail.com> | 2015-08-25 16:50:53 -0700 |
---|---|---|
committer | Feng Xiao <xfxyjwf@gmail.com> | 2015-08-25 16:50:53 -0700 |
commit | cc5a1bfede7f5b691760ae3efe271961e466cedb (patch) | |
tree | 43abf0e33352b316281e971762df2cbbbb0cc374 /src/google/protobuf/compiler/java/java_helpers.h | |
parent | f4ef8fe3b8e25ff5204bec46f7ad86b933f4ce32 (diff) | |
download | protobuf-cc5a1bfede7f5b691760ae3efe271961e466cedb.tar.gz protobuf-cc5a1bfede7f5b691760ae3efe271961e466cedb.tar.bz2 protobuf-cc5a1bfede7f5b691760ae3efe271961e466cedb.zip |
Make the PARSER @Deprecated public.
(cherry-picking an intenral change).
Diffstat (limited to 'src/google/protobuf/compiler/java/java_helpers.h')
-rw-r--r-- | src/google/protobuf/compiler/java/java_helpers.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/google/protobuf/compiler/java/java_helpers.h b/src/google/protobuf/compiler/java/java_helpers.h index 7eef86a7..5392d6d7 100644 --- a/src/google/protobuf/compiler/java/java_helpers.h +++ b/src/google/protobuf/compiler/java/java_helpers.h @@ -310,6 +310,12 @@ inline bool SupportFieldPresence(const FileDescriptor* descriptor) { return descriptor->syntax() != FileDescriptor::SYNTAX_PROTO3; } +// Whether generate classes expose public PARSER instances. +inline bool ExposePublicParser(const FileDescriptor* descriptor) { + // TODO(liujisi): Mark the PARSER private in 3.1.x releases. + return descriptor->syntax() == FileDescriptor::SYNTAX_PROTO2; +} + // Whether unknown enum values are kept (i.e., not stored in UnknownFieldSet // but in the message and can be queried using additional getters that return // ints. |