Robert Burrell Donkin wrote:

> Mason Ham wrote:
>
> > It can be summarized in the following code that I added. I though you
> > might want to add it in :-)  /**
> >   * This will allow you to call a specific function from the command
> > line.
> >   * It uses reflection to make the call. It is useful for "learning"
> > how to write
> >   * ECS pages etc. It is simple reflection and so it assumes that any
> >   * method you are calling has no parameters.
> >   *
> >   * TODO: make it so that you can call with parameters etc
> >   *
> >   * @param method This is the method that you want to make the call
> > on.
> >   * @param ecs    This is the ecs testbed instance to call on.
> >   */
> >  private static void callMethod(String method, TestBed ecs){
> >   try{
> >    java.lang.reflect.Method meth = TestBed.class.getMethod(method, new
> > Class[]{});
> >    meth.invoke(ecs , new Class[]{});
> >   } catch (Exception e){
> >    e.printStackTrace();
> >   }
> >  } You can then add this code to the main to make it happen.TestBed
> > ecs = new TestBed(); if (args.length == 1) {
> >            callMethod(args[0], ecs);
> > } ONE WORD OF WARNING. I didn't make this robust (obviously) so...if
> > you don't pass in the right method name it will simply print a
> > stacktrace and die :-(If others want me to extend it I could ... but
> > this was all I needed ;-)
>
> hi
> things are often a little slow on this list so i thought i'd better
> offer some advice before you die of old age ;-)

I don't seem to have recieved that particular mail.
Typically if i don't answer in a few hours I didn't recieve it or my mail
filter failed for some weird reason.

-stephan


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to