* @return
*/
public static <T> MethodAccessor<T> findMethodByArgCount(Class targetClazz, String methodName, int args) {
List<Method> methods = MethodHelper.getMethod(targetClazz, methodName, args);
if (methods.size() == 0) {
throw new JTesterReflectionException("No such method: " + methodName + ",parameter count:" + args);
}
if (methods.size() > 1) {
throw new JTesterReflectionException("More then one method: " + methodName + ",parameter count:" + args);
}
Method method = methods.get(0);
return new MethodAccessor<T>(method);
}