*
The moose likes Java in General and the fly likes A code generator problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "A code generator problem" Watch "A code generator problem" New topic
Author

A code generator problem

Ricky Wang
Greenhorn

Joined: Oct 27, 2003
Posts: 14
If is there any code generator for the following purpose:

1. Generate a function with specified parameters such as foo(int a, char b, double c,...)

2. Within this function, a series of nested "if/else-if" is generated. The condition expression within if can also be auto-generated with provided rules.
For example,
if (c - a < 0) {
if ( b == 'y' || b == 'n') {

}
}

Simply put, I need a tool to help me to randomly generate a host of test functions.

Any suggestion is welcome .
Ricky.
[ April 20, 2007: Message edited by: Ricky ]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: A code generator problem
 
Similar Threads
Using Sun's Migration Tool...
which has more priority: || and &&
Operator precedence
Evaluation Order.
String split function and "||" String