]> source.dussan.org Git - vaadin-framework.git/commitdiff
Scan parametrized types, e.g. List<MyObject> when generating serializers
authorArtur Signell <artur@vaadin.com>
Thu, 12 Apr 2012 16:13:12 +0000 (19:13 +0300)
committerArtur Signell <artur@vaadin.com>
Thu, 12 Apr 2012 16:13:12 +0000 (19:13 +0300)
src/com/vaadin/terminal/gwt/widgetsetutils/SerializerMapGenerator.java

index 21d081f0a515e977d76a1fac316f1b3240e8146a..e09545962b8f2e92f81ccafea4bc630cd07a7f09 100644 (file)
@@ -18,6 +18,7 @@ import com.google.gwt.core.ext.TreeLogger.Type;
 import com.google.gwt.core.ext.UnableToCompleteException;
 import com.google.gwt.core.ext.typeinfo.JClassType;
 import com.google.gwt.core.ext.typeinfo.JMethod;
+import com.google.gwt.core.ext.typeinfo.JParameterizedType;
 import com.google.gwt.core.ext.typeinfo.JType;
 import com.google.gwt.core.ext.typeinfo.TypeOracle;
 import com.google.gwt.json.client.JSONObject;
@@ -221,6 +222,13 @@ public class SerializerMapGenerator extends Generator {
         if (serializableTypes.contains(type)) {
             return;
         }
+        JParameterizedType parametrized = type.isParameterized();
+        if (parametrized != null) {
+            for (JClassType parameterType : parametrized.getTypeArgs()) {
+                addTypeIfNeeded(serializableTypes, parameterType);
+            }
+        }
+
         if (serializationHandledByFramework(type)) {
             return;
         }