THRIFT-253. java: Enhance FieldMetaData

The code generator new creates a static map of field id to metadata for each field, including information like the field TType, class of embedded structs, required/optional/default, etc. Additionally, on loading, generated classes statically register their class and metadata map with the global FieldMetaData map, so you can get the metadata for any TBase-implementing class easily.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@738708 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/test/ThriftTest.thrift b/test/ThriftTest.thrift
index 275b574..a042d7e 100644
--- a/test/ThriftTest.thrift
+++ b/test/ThriftTest.thrift
@@ -43,6 +43,12 @@
   2: list<Xtruct> xtructs
 }
 
+struct CrazyNesting {
+  1: string string_field,
+  2: optional set<Insanity> set_field,
+  3: required list< map<set<i32>,map<i32,set<list<map<Insanity,string>>>>>> list_field
+}
+
 exception Xception {
   1: i32 errorCode,
   2: string message
@@ -129,4 +135,4 @@
 struct ListTypeVersioningV2 {
        1: list<string> strings;
        2: string hello;
-}
\ No newline at end of file
+}