I am writing a Java application that needs a lot of static data that is stored in many types of enumerations. Since I would like to use a convenient way to configure this data using, for example, xml or json files, but I am not allowed to do this directly with enums, I was looking for a way to elegantly do this.
Maybe a good solution would be to have a separate java program that reads xml files and creates java sources, which are then compiled with the rest of the sources. My doubt is how to automate this process autonomously (for example, ant?) And how easy it is to integrate it with eclipse so that it automatically runs when working with a project. Something similar to what I'm already looking for? Any suggestion to solve my problem?
Thanks!
source share