Results 1 to 4 of 4
Thread: Create *.java file dynamicaly
- 07-01-2011, 01:51 PM #1Member
- Join Date
- Jul 2011
- Rep Power
Create *.java file dynamicaly
I am writing a code which is generating .java and .xml files dyanamically.
For xml files I am using javax.xml.parsers.DocumentBuilderFactory .
My xml files are generating correctly but I have some queries regarding genrerating .java files.
I want to create a java file which will have some methods and variables.
Is there any way to do this?
Is there any java classes or libraries to do this?
- 07-01-2011, 02:58 PM #2I want to create a java file which will have some methods and variables.
Are you asking if there is a Java statement generator engine? The only one I know of is the one in front of the keyboard.
- 07-02-2011, 01:05 AM #3Get in the habit of using standard Java naming conventions!
- 07-02-2011, 01:09 AM #4
Here's an example of how I used it. Note that although I defined the classes, methods, and fields the "right" way, when it came to generating the method bodies, I mostly cheated and used JBlock.directStatement(...).
http://szprotocol.svn.sourceforge.ne...Generator.javaGet in the habit of using standard Java naming conventions!
- By Riaz Ali in forum New To JavaReplies: 4Last Post: 08-03-2010, 09:20 AM
- By Harbox in forum New To JavaReplies: 5Last Post: 07-26-2010, 02:42 PM
- By pads in forum New To JavaReplies: 4Last Post: 07-09-2010, 06:20 PM
- By radix in forum New To JavaReplies: 8Last Post: 11-06-2008, 05:17 PM
- By DavidJohns in forum Advanced JavaReplies: 2Last Post: 05-21-2008, 08:15 AM