Sunday, November 16, 2014

Generators

Hello

Is real opportunity to create generators with the interface

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit
1.7.0//EN"
"http://google-web-toolkit.googlecode.com/svn/tags/1.7.0/distro-source/core/src/gwt-module.dtd">

<module>
<inherits name="com.google.gwt.user.User"/>

<generate-with class="org.yournamehere.server.GeneratorOne">
<when-type-assignable
class="com.google.gwt.user.client.ui.IsWidget" />
</generate-with>

<generate-with class="org.yournamehere.server.GeneratorTwo">
<when-type-assignable
class="com.google.gwt.user.client.ui.IsWidget" />
</generate-with>

<entry-point class="org.yournamehere.client.MainEntryPoint"/>

<!-- Do not define servlets here, use web.xml -->
</module>

I run thus:
public void onModuleLoad() {
GenOne one = GWT.create(Button.class);
System.out.println(one.getRTTI());
GenTwo two = GWT.create(Button.class);
System.out.println(two.getRTTI());
}


RG:
Ɓukasz

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment