THRIFT-290. java: Metadata map doesn't properly reference external thrift file's types

The code generator now uses full namespaces to refer to the classes.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@739045 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/compiler/cpp/src/generate/t_java_generator.cc b/compiler/cpp/src/generate/t_java_generator.cc
index 81fb590..30e7f78 100644
--- a/compiler/cpp/src/generate/t_java_generator.cc
+++ b/compiler/cpp/src/generate/t_java_generator.cc
@@ -643,7 +643,7 @@
   // Static initializer to populate global class to struct metadata map
   indent(out) << "static {" << endl;
   indent_up();
-  indent(out) << "FieldMetaData.addStructMetaDataMap(" << tstruct->get_name() << ".class, metaDataMap);" << endl;
+  indent(out) << "FieldMetaData.addStructMetaDataMap(" << type_name(tstruct) << ".class, metaDataMap);" << endl;
   indent_down();
   indent(out) << "}" << endl << endl;
 
@@ -1578,7 +1578,7 @@
   indent_up();
   indent_up();
   if (type->is_struct()){
-    indent(out) << "new StructMetaData(TType.STRUCT, " << type->get_name() << ".class";
+    indent(out) << "new StructMetaData(TType.STRUCT, " << type_name(type) << ".class";
   } else if (type->is_container()){
     if (type->is_list()){
       indent(out) << "new ListMetaData(TType.LIST, ";