Brandon McCulligh's Portfolio
Proof Of Concepts
Java Class Generator
Lines of Code:
Start -> Programs -> Brandon McCulligh
Windows XP and Higher
This tool was created for work because I was tired of always writing the same style of constructor, the same style of javadocs, and the same style of toString. I was creating objects for every new project at work as I worked on the under the scenes code and I felt it was a giant waste of time. Rational Application Developer (RAD) could generate the getters and setter methods for you but that was it and wasn’t enough for me. So I wrote this tool which now I can literally bang out an object 10x faster than before.
Why did I write a Java class generator in C#? The answer is actually very simple, Java (as far as I have ever seen) does not have a drag and drop UI for GUI tools and therefore takes 20x longer to develop anything in it because you have to manually position everything via code. C# (and all of .Net for that matter) with Visual Studio has a tool box and you drop controls onto the UI and then just write what you want them to do. If I wrote this same tool in Java it probably would’ve taken about 5-10hours instead of the less than 1 hour it actually took.
Java Class Generator Installer.zip
Typically I create my class in RAD first with an empty class definition and then I open this tool and follow the steps below;
1) Enter the class name
2) Hit tab
3) Type a variable in with its data type such as String name
4) Hit tab
5) Hit enter
- control returns to the variable entry text box, repeat steps 3-5 for as many
variables as you see fit.
6) Hit generate class
7) Click into the right pane of the UI and it will highlight the text for you
8) Hit Ctrl+C to copy the contents
9) Go back to where you defined your empty class and paste (Ctrl+P) into the body of the class
10) Hit Ctrl+Shift+O to organize all imports
11) Hit Ctrl+Shift+F to format the code according to your coding template
Powered by: Great White North Productions© Technologies