I have a rather big number of source files that I need parse and extract all string literals and put them in a file as play old java constant.
For exemple:
There are some good reasons why you wouldn't want to do this. Aside from the fact that any such generated file (I didn't know about the eclipse function)is not going to distinguish between strings that you're setting, for example, as constructor args in test classes and things you actually want to have as constants, the bigger issue is that all of your public static finals are going to be compiled into your classes, and if you want to alter the classes behaviour you'll need to alter not only the class holding the constants but everything that references it.