in src/main/java/org/apache/bsf/engines/netrexx/NetRexxEngine.java [164:199]
Object callStatic(Class rexxclass, String method, Object[] args)
throws BSFException
{
//***** ISSUE: Currently supports only static methods
Object retval = null;
try
{
if (rexxclass != null)
{
//***** This should call the lookup used in BML, for typesafety
Class[] argtypes=new Class[args.length];
for(int i=0;i<args.length;++i)
argtypes[i]=args[i].getClass();
Method m=MethodUtils.getMethod(rexxclass, method, argtypes);
retval=m.invoke(null,args);
}
else
{
logger.error("NetRexxEngine: ERROR: rexxclass==null!");
}
}
catch(Exception e)
{
e.printStackTrace ();
if (e instanceof InvocationTargetException)
{
Throwable t = ((InvocationTargetException)e).getTargetException ();
t.printStackTrace ();
}
throw new BSFException (BSFException.REASON_IO_ERROR,
e.getMessage (),
e);
}
return retval;
}