Sorry, there is no way that writing out a new class is 9000x faster than updating my config file. [...]
ctrl+n, enter, "ShipArrived", enter -- created new class
"pf", tab, "f", enter, "x,y,z;", enter -- expands to public final float x, y, z;
"pf", tab, "i", enter, "entity;", enter
ctrl+space, down, enter -- creates constructor
41 vs 49 keystrokes
and this only gets alot worse when you use classes, cause you have to write out the hole class path.
Besid this silly counting
What I wanted to explain to you is that refactoring is a big thing. And you can't do this with your approach. I also wanted to point out that you don't save any time with your code generation.
Part of the motivation for doing it in the first place is that I often find myself, adding, removing, and editing message types and this config file is an easier place to do this.
changing stuff == refactoring
which is much easier when you do it in the IDE, i.e. you change the name of a parameter
also when you change a single attribut of an message type, you have to rebuild all your messages, which is a lot of time you would waste. Editing a java class in your IDE doesn't take 10sec.
Furthermore lets look at a example
[In the Entity class, what I think you do]
public void processEvent(Event ev)
if(ev instanceOf AttackEvent)
AttackEvent tmp = (AttackEvent)ev;
takeDamage(tmp.amount * getTypeMultiplier(tmp.type));
[with my code you just would "if else" over the data instead of over the event]
ps: don't get me wrong, writing such tools by yourselfs is always a quite interesting thing to do, but in alot of cases it doesn't really is that usefull in the end. I don't want to bash your idea, but my problem with it is that you are just writing the classes in an own DSL which doesn't save you anything in the end(time, and characters to type)