0

I have a rather strange requirement. I have property files in which same keys are added and a respective java constant is created in interface file.

I want to relive myself of adding into all the files again and again.I know how to read write property file. Is there a way to read / write java file. I mean not the usual file read APIs like

JavaFileReader jfr;
jfr.AddField("fdsf");

I understand its very specific requirement.But hoping someone else also has the need:):)

Alberto Zaccagni
  • 30,779
  • 11
  • 72
  • 106
Ravisha
  • 3,261
  • 9
  • 39
  • 66
  • @Ravisha : I am not sure if I understand what you are asking... Do you want to modify already compiled `.class` files based on the contents of a `.properties` file? Or do you want to automatically update the contents of `.java` files based on the contents of a `.properties` file? – bguiz Apr 26 '10 at 10:30
  • Its the .java file which needs to be modified – Ravisha Apr 26 '10 at 11:01

1 Answers1

2

You could use codemodel. Take a look at this thread. It might help on how to use it.

Community
  • 1
  • 1
rochb
  • 2,249
  • 18
  • 26