Does anyone know what approach one can take to automatically generate Java source code, from for example an xml or json file, in eclipse?
One great example of what I am thinking of doing is what Google Android sdk does: they have an R class generated automatically from the resources.
Every time a resource file is saved in Eclipse R class is automatically regenerated.
UPDATE: Example: In the text (xml or json file) I have the following:
<tags>
<tag id="ALPHA">
<description>The first alpha tag.</description>
<value>231232</value>
</tag>
<tag id="BETA">
<description>This is the beta tag.</description>
<value>231232</value>
</tag>
Then in my generated java class, say R I would have something like:
R.tags.ids.ALPHA //refers to an enum value for example
R.tags.values.ALPHA //refers to final int with avlue 231232
R.tags.descriptions.ALPHA //refers to the String with description
Thanks!