I'm looking to develop a tool which will take simplified code in the format:
MyObject
{
[Get, Construct]
String name;
[Get, Construct]
String description;
[Get, Set]
Boolean isAlive;
}
And will spit out java/C# code like:
public class MyObject {
public MyObject(
String name,
String description) {
this.name = name;
this.description = description;
}
public String getName() {
return this.name;
}
public String getDescription() {
return this.description;
}
public Boolean getIsAlive() {
return this.isAlive;
}
public Boolean setIsAlive(
Boolean isAlive) {
this.isAlive = isAlive;
}
private String name;
private String description;
private Boolean isAlive;
}
The purpose of this is to basically make my life easier, as a lot of what I've been doing lately it making objects which are simply reflections of things in the logical model of our project.
I already know how I'm going to write the output, but I'm just wondering if;
A) Are there any tools around that already do this kind of thing? B) Are there any libraries around (either in C# or java), which would be useful in parsing the input language? I know it's a custom language, but it shares a lot of similarities with C#. I'm wondering if there is anything that may save me some time?