title: Simple way to define an enum at runtime (or compile time by some middleware)
body: <p>is there a way to define an enum set of constants by loading and parsing the data from a script file (maybe an XML or a JSON file)?</p>
  
  <p>I ask this because I'm using enums intensively in a project, they have a lot of parameters (like every entry can have also 10-15 parameters) and I would like to give to the final user a way to modify them without having to bother modifying java sources and recompile.</p>
  
  <p>I don't think it is easily possible since there is some static type check involved but maybe there is a simple way to preprocess a file at compile time and use the info to produce the static enum values. I know I could just write a separate script to do this work and produce a .java file output ready to be compiled but this will imply that the user will have to recompile the whole thing.</p>