summaryrefslogtreecommitdiff
path: root/test/AnnotationTest.thrift
diff options
context:
space:
mode:
authorDavid Reiss <dreiss@apache.org>2008-12-10 01:52:48 +0000
committerDavid Reiss <dreiss@apache.org>2008-12-10 01:52:48 +0000
commita2309996679350a249beeac34efd65ff703f5b23 (patch)
tree907fff4f8a067c923c864f978b7452d3ec2b9b4e /test/AnnotationTest.thrift
parent322e595c2ac8a7ff4ef53cc472882d85e36000a0 (diff)
downloadthrift-a2309996679350a249beeac34efd65ff703f5b23.tar.gz
THRIFT-121. Support arbitrary type annotations
Adds syntax for attaching arbitrary key/value pairs to types. These annotations can be accessed by individual generators to alter the code they produce. This version supports annotations on container types and structures. git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@724954 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test/AnnotationTest.thrift')
-rw-r--r--test/AnnotationTest.thrift12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/AnnotationTest.thrift b/test/AnnotationTest.thrift
new file mode 100644
index 000000000..64e8d82e0
--- /dev/null
+++ b/test/AnnotationTest.thrift
@@ -0,0 +1,12 @@
+typedef list<i32> ( cpp.template = "std::list" ) int_linked_list
+
+struct foo {
+ 1: i32 bar;
+ 2: i32 baz;
+ 3: i32 qux;
+ 4: i32 bop;
+} (
+ cpp.type = "DenseFoo",
+ python.type = "DenseFoo",
+ java.final = "",
+)