Hi Roger,
maybe one need not see it as strict as Johannes:
For inspirations, have a look at the run method CommandFinder code,
http://rsb.info.nih.gov/ij/source/ij/plugin/CommandFinder.java Hashtable realCommandsHash = ij.Menus.getCommands();
Here you get all commands; skip those that are internal comands (hash
value, i.e., name of the method starting with "ij.")
A clean way would be defining an interface with the static method and
all your plugins implementing that interface.
Otherwise, you will need 'reflection' to check whether the plugin
class has the method that you want to call, then use 'invoke':
http://java.sun.com/j2se/1.4.2/docs/api/java/lang/
Class.html#getDeclaredMethod(java.lang.String,%20java.lang.Class[])
http://java.sun.com/j2se/1.4.2/docs/api/java/lang/reflect/
Method.html#invoke(java.lang.Object,%20java.lang.Object[])
Michael
________________________________________________________________
On 2 Jun 2009, at 04:31, roger.sama wrote:
> Hello guys,
>
> I've search for a topic about this subject but haven't found
> anything that
> help me.
>
> I want to list the available plugins and call them (a specific static
> method) in execution time. I'm developping a kind of testing tool
> and I need
> the user to select the plugin that he wants to test.
>
> Can anyone help me?=^D
>
> Thanks for the time,
>
> Roger
>