<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: GWT: generating the factory</title>
	<atom:link href="http://blog.gerardin.info/archives/491/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.gerardin.info/archives/491</link>
	<description>Java, Agile, the Web and other nice things</description>
	<lastBuildDate>Sun, 15 Jan 2012 01:56:06 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Lars</title>
		<link>http://blog.gerardin.info/archives/491/comment-page-1#comment-1078</link>
		<dc:creator>Lars</dc:creator>
		<pubDate>Fri, 30 Jul 2010 04:20:40 +0000</pubDate>
		<guid isPermaLink="false">http://blog.gerardin.info/?p=491#comment-1078</guid>
		<description>Thanks a lot for the write-up - just what I needed. It&#039;s a nice and clear intro to generators.</description>
		<content:encoded><![CDATA[<p>Thanks a lot for the write-up &#8211; just what I needed. It&#8217;s a nice and clear intro to generators.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: olivier</title>
		<link>http://blog.gerardin.info/archives/491/comment-page-1#comment-771</link>
		<dc:creator>olivier</dc:creator>
		<pubDate>Wed, 04 Nov 2009 08:37:28 +0000</pubDate>
		<guid isPermaLink="false">http://blog.gerardin.info/?p=491#comment-771</guid>
		<description>That would be nice, but unfortunately it doesn&#039;t work: eval chokes on the &quot;new&quot; syntax. 
I believe you can only use this construct when you have a literal class name, not inside an eval string.</description>
		<content:encoded><![CDATA[<p>That would be nice, but unfortunately it doesn&#8217;t work: eval chokes on the &#8220;new&#8221; syntax.<br />
I believe you can only use this construct when you have a literal class name, not inside an eval string.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave Finch</title>
		<link>http://blog.gerardin.info/archives/491/comment-page-1#comment-770</link>
		<dc:creator>Dave Finch</dc:creator>
		<pubDate>Wed, 04 Nov 2009 07:50:42 +0000</pubDate>
		<guid isPermaLink="false">http://blog.gerardin.info/?p=491#comment-770</guid>
		<description>Thanks for your help.</description>
		<content:encoded><![CDATA[<p>Thanks for your help.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David</title>
		<link>http://blog.gerardin.info/archives/491/comment-page-1#comment-769</link>
		<dc:creator>David</dc:creator>
		<pubDate>Tue, 03 Nov 2009 20:21:49 +0000</pubDate>
		<guid isPermaLink="false">http://blog.gerardin.info/?p=491#comment-769</guid>
		<description>Or maybe a better class/method name combination is GWTInstanciator for the class and newInstance for the method.</description>
		<content:encoded><![CDATA[<p>Or maybe a better class/method name combination is GWTInstanciator for the class and newInstance for the method.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David</title>
		<link>http://blog.gerardin.info/archives/491/comment-page-1#comment-768</link>
		<dc:creator>David</dc:creator>
		<pubDate>Tue, 03 Nov 2009 20:20:37 +0000</pubDate>
		<guid isPermaLink="false">http://blog.gerardin.info/?p=491#comment-768</guid>
		<description>I have almost no experience in GWT but isn&#039;t the simplest solution to your &quot;generator problem&quot; to have a single class ControllerResolver with a static resolve(Class clazz) method as follows:

public static native Object resolve(Class c) /*-{
    return eval(&quot;@&quot;+c.@java.lang.Class::getName()+&quot;::new()()&quot;);
  }-*/;

or something along those lines (have not tested for correctness, just trying to give the idea)</description>
		<content:encoded><![CDATA[<p>I have almost no experience in GWT but isn&#8217;t the simplest solution to your &#8220;generator problem&#8221; to have a single class ControllerResolver with a static resolve(Class clazz) method as follows:</p>
<p>public static native Object resolve(Class c) /*-{<br />
    return eval(&#8220;@&#8221;+c.@java.lang.Class::getName()+&#8221;::new()()&#8221;);<br />
  }-*/;</p>
<p>or something along those lines (have not tested for correctness, just trying to give the idea)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: olivier</title>
		<link>http://blog.gerardin.info/archives/491/comment-page-1#comment-767</link>
		<dc:creator>olivier</dc:creator>
		<pubDate>Tue, 03 Nov 2009 15:12:20 +0000</pubDate>
		<guid isPermaLink="false">http://blog.gerardin.info/?p=491#comment-767</guid>
		<description>Sure.. 

If you set the GWT compiler&#039;s log level to DEBUG (warning: it generates an insane amount of messages!), somewhere in the junk you&#039;ll see this sequence:
&lt;code&gt;    Invoking &lt;generate-with class=&#039;&lt;em&gt;your-generator-class&lt;/em&gt;&#039;/&gt;
             Generating &lt;em&gt;substituted-target-class&lt;/em&gt;
                 &lt;em&gt;(your own log messages...)&lt;/em&gt;
&lt;/code&gt;
and after it&#039;s done:
&lt;code&gt;             Generator returned class &#039;&lt;em&gt;your-generated-class&lt;/em&gt;&#039;
             Finished in 35 ms
          Assimilating generated source
             Generated source files...
                file:&lt;em&gt;/path/to/generated/source.java&lt;/em&gt;
&lt;/code&gt;
That&#039;s where you will find the generated source file.</description>
		<content:encoded><![CDATA[<p>Sure.. </p>
<p>If you set the GWT compiler&#8217;s log level to DEBUG (warning: it generates an insane amount of messages!), somewhere in the junk you&#8217;ll see this sequence:<br />
<code>    Invoking &lt;generate-with class=&#039;<em>your-generator-class</em>'/&gt;<br />
             Generating <em>substituted-target-class</em><br />
                 <em>(your own log messages...)</em><br />
</code><br />
and after it&#8217;s done:<br />
<code>             Generator returned class '<em>your-generated-class</em>'<br />
             Finished in 35 ms<br />
          Assimilating generated source<br />
             Generated source files...<br />
                file:<em>/path/to/generated/source.java</em><br />
</code><br />
That&#8217;s where you will find the generated source file.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave Finch</title>
		<link>http://blog.gerardin.info/archives/491/comment-page-1#comment-766</link>
		<dc:creator>Dave Finch</dc:creator>
		<pubDate>Tue, 03 Nov 2009 13:26:00 +0000</pubDate>
		<guid isPermaLink="false">http://blog.gerardin.info/?p=491#comment-766</guid>
		<description>Nice article.

One quick question that you may be able to help me with:

If the generated output does not compile then logs will point to a java file in your temp folder but if everything compiles OK but doesn&#039;t do exactly what it should how (or where) can you see to generated coded? 

Thanks,
Dave</description>
		<content:encoded><![CDATA[<p>Nice article.</p>
<p>One quick question that you may be able to help me with:</p>
<p>If the generated output does not compile then logs will point to a java file in your temp folder but if everything compiles OK but doesn&#8217;t do exactly what it should how (or where) can you see to generated coded? </p>
<p>Thanks,<br />
Dave</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sakuraba</title>
		<link>http://blog.gerardin.info/archives/491/comment-page-1#comment-765</link>
		<dc:creator>Sakuraba</dc:creator>
		<pubDate>Tue, 03 Nov 2009 08:59:22 +0000</pubDate>
		<guid isPermaLink="false">http://blog.gerardin.info/?p=491#comment-765</guid>
		<description>Thank you so much for this blog post. I always wanted to know about Generators and thanks to your insightful introduction I finally understood what they are all about.</description>
		<content:encoded><![CDATA[<p>Thank you so much for this blog post. I always wanted to know about Generators and thanks to your insightful introduction I finally understood what they are all about.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: olivier</title>
		<link>http://blog.gerardin.info/archives/491/comment-page-1#comment-764</link>
		<dc:creator>olivier</dc:creator>
		<pubDate>Mon, 02 Nov 2009 22:11:51 +0000</pubDate>
		<guid isPermaLink="false">http://blog.gerardin.info/?p=491#comment-764</guid>
		<description>Mostly because I wanted to learn how to use GWT generators :)
I considered Gin but it seemed overkill for what I wanted to do.</description>
		<content:encoded><![CDATA[<p>Mostly because I wanted to learn how to use GWT generators <img src='http://blog.gerardin.info/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
I considered Gin but it seemed overkill for what I wanted to do.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Benju</title>
		<link>http://blog.gerardin.info/archives/491/comment-page-1#comment-763</link>
		<dc:creator>Benju</dc:creator>
		<pubDate>Mon, 02 Nov 2009 17:53:38 +0000</pubDate>
		<guid isPermaLink="false">http://blog.gerardin.info/?p=491#comment-763</guid>
		<description>Why not use Google Gin for this?

http://code.google.com/p/google-gin/</description>
		<content:encoded><![CDATA[<p>Why not use Google Gin for this?</p>
<p><a href="http://code.google.com/p/google-gin/" rel="nofollow" class="liexternal">http://code.google.com/p/google-gin/</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>

