I am no stranger to generators and/or annotation processors. I think, if that is "really easy" then what I am proposing is the equivalent of "a goldfish could do it" (this is a favorite saying of one of my professors in college, the one that taught mainframe assembly).
The generator that uses the compile time file feels like a better solution, but I think that something that does that for you should be part of the framework.
I think I will go that route though and when it's good enough, maybe I'll offer it up as a patch. Was just hoping that there was already something in place that I was missing.
Jonathon Lamon
Principle Software Engineer
Perceptronics Solutions Inc.
Tel 703-485-2922
Cell 269-205-4649
www.percsolutions.com
Principle Software Engineer
Perceptronics Solutions Inc.
Tel 703-485-2922
Cell 269-205-4649
www.percsolutions.com
On Mon, Oct 27, 2014 at 6:29 PM, Jens <jens.nehlmeier@gmail.com> wrote:
The reason is that you aren't really creating a new implementation of the logic, so i feel that having to create a class to set a property is a bit redundant/ridiculous.Yeah maybe my example is a bit off. I think in reality I would have created a configuration interface that has getters for each config value and then provide different implementations of that configuration interface. Then I would pass in that configuration to the real class that contains the logic. IMHO that feels a lot better to me since you don't end up with empty sub classes only to call a super constructor with different parameters. It is also a lot more descriptive.For such configuration classes, writing a generator is really easy. GWT actually has a generator that kind of does what you want. Take a look at UserAgentGenerator which generates an implementation of UserAgent. The generator code that produces UserAgent.getCompileTimeValue() is exactly what you need to generate a configuration class that simply returns compile time XML property values.-- J.--
You received this message because you are subscribed to a topic in the Google Groups "Google Web Toolkit" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-web-toolkit/_MBUHniKSI8/unsubscribe.
To unsubscribe from this group and all its topics, 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.
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