public static Object invokeDeclared(Class c,Object obj,String method,Class[] paramClasses,Object[] params) throws IllegalAccessException, NoSuchMethodException, InvocationTargetException {
  Method m=c.getDeclaredMethod(method,paramClasses);
  m.setAccessible(true);
  return m.invoke(obj,params);
}

public static Object invokeDeclared ( Class c , Object obj , String method , Class [ ] paramClasses , Object [ ] params ) throws IllegalAccessException , NoSuchMethodException , InvocationTargetException { Method m = c . getDeclaredMethod ( method , paramClasses ) ; m . setAccessible ( true ) ; return m . invoke ( obj , params ) ; }
invokes any method of a class , even private ones .
