... to functions (as in C) in Java ?

Hi gurus,

The problem :

Want to initialize an array (or other data structure), either
thru code, or by reading from a text file/properties file.
Each element will contain the name of a program option to
run, and the name of a corresponding Java method that implements
that program option. Then I display the names of the options to the
user and allow them to select 1 or more options to run. After they
click a button to confirm, iterate thru the array and call each of the
methods corresponding to the options selected, and display their output
to the user.

This is basically for a status display facility, to
be implemented using servlets and HTML forms, with
the options displayed as a list of items with checkboxes
alongside. The user will check a box to enable execution
of the corresponding option. The same servlet will be
called with the selected options as parameters to the URL,
and will extract the parameters, and scan thru the array
and execute the matching option methods.

The idea is to make the program extensible without
modifying the main loop; should just be able to add
a name/method entry to the text file, write/compile the new
class/method for the new option, and it should get displayed/
executed on the next run of the program.

Hope it's clear.
Is it possible thru reflection or any other way ?

TIA
++++++++++++++++++++++++++++++++++++++++++++++++
Vassudev
Infosys Technologies Limited,
Pune, India
[EMAIL PROTECTED]
----------------------------------------------------------------
On a clear day you can see the blue screen of death
++++++++++++++++++++++++++++++++++++++++++++++++

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to