Friday, September 3, 2010

How can I get a class by it's name and then construct it?

Hello,
I am trying to split my code and load classes by a name I get from the
server.
I tried using Class.forName("com.app.classes."+className) but GWT
doesn't support it.

How can I get a class and then construct it like this:
new (getClass("com.app.classes."+className))("Param1", "param2");

Thanks.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment