public static Object callStaticMethod ( Method method , Object [ ] params ) { try { return method . invoke ( null , params ) ; } catch ( IllegalAccessException e ) { throw new IllegalStateException ( e ) ; } catch ( InvocationTargetException e ) { throw new IllegalStateException ( e ) ; } }
Calls a named static method on a class with a specified set of parameters .