I think in your generated method you have to do an unchecked cast into T and 
its also nice if you let T extend Constructable to get at least some error 
when you try to assign the returned object to a type that does not implement 
Constructable, e.g.:

public <T extends Constructable> T instantiate (String className) {
  .....
  .....
  if("MyPanel".equals(className)) {
     return (T) new MyPanel();
  }
  ....
}



-- J.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/4Xjf_KBbObcJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to