diff options
author | Artur Signell <artur@vaadin.com> | 2012-04-12 19:13:12 +0300 |
---|---|---|
committer | Artur Signell <artur@vaadin.com> | 2012-04-12 19:13:12 +0300 |
commit | 947669f5df03f24604964e9b09fb1b3c9ef39dd2 (patch) | |
tree | f57fefcee47a7112aec49405c1904641724b3473 | |
parent | 9b22c384df2df529b9961a4836747b761b5353fc (diff) | |
download | vaadin-framework-947669f5df03f24604964e9b09fb1b3c9ef39dd2.tar.gz vaadin-framework-947669f5df03f24604964e9b09fb1b3c9ef39dd2.zip |
Scan parametrized types, e.g. List<MyObject> when generating serializers
-rw-r--r-- | src/com/vaadin/terminal/gwt/widgetsetutils/SerializerMapGenerator.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/com/vaadin/terminal/gwt/widgetsetutils/SerializerMapGenerator.java b/src/com/vaadin/terminal/gwt/widgetsetutils/SerializerMapGenerator.java index 21d081f0a5..e09545962b 100644 --- a/src/com/vaadin/terminal/gwt/widgetsetutils/SerializerMapGenerator.java +++ b/src/com/vaadin/terminal/gwt/widgetsetutils/SerializerMapGenerator.java @@ -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; } |