THRIFT-409. java: Add "union" to Thrift
authorBryan Duxbury <bryanduxbury@apache.org>
Tue, 1 Sep 2009 23:03:47 +0000 (23:03 +0000)
committerBryan Duxbury <bryanduxbury@apache.org>
Tue, 1 Sep 2009 23:03:47 +0000 (23:03 +0000)
commitab3666e6caad79315fddf0f8f38c13c7a10cc23a
tree4130f6c9eaae3553171c4c4a0d18623697a63193
parentfd58c55dca197daea0df23a339a1d106dea8189b
THRIFT-409. java: Add "union" to Thrift

This patch introduces new IDL syntax for creating Unions, explicityly single-valued structs. While the parser changes are portable, this patch only includes the actual generated code changes for the Java library. Other libraries can continue to generate a struct with the same fields and remain compatible until they are able to implement the full shebang.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@810300 13f79535-47bb-0310-9956-ffa450edef68
compiler/cpp/src/generate/t_generator.cc
compiler/cpp/src/generate/t_java_generator.cc
compiler/cpp/src/parse/t_struct.h
compiler/cpp/src/thriftl.ll
compiler/cpp/src/thrifty.yy
lib/java/build.xml
lib/java/src/org/apache/thrift/TBase.java
lib/java/src/org/apache/thrift/TUnion.java [new file with mode: 0644]
lib/java/test/org/apache/thrift/test/UnionTest.java [new file with mode: 0644]
test/DebugProtoTest.thrift