Say I have a text file with a simple method:
public void sayHello() {
System.out.println("HELLO!");
}
Is there anyway to take that code and programatically insert the code into an existing .java file? Or even create a new Java source file with the code provided in the text file? I have heard of solutions where you can generate source code using CodeModel, but I would have to write my own parser to handle all the possible code that would be read from the text file.