|| AnnotationUtils.findAnnotation(userClass, UIController.class) != null) {
Method[] methods = userClass.getMethods();
for (int i = 0; i < methods.length; i++) {
if (methods[i].getName().equals(methodName)) {
Object[] resolvedArguments = argumentsResolver.resolveArguments(methods[i], args);
candidates.add(new MethodHolder(methodId, bean, methods[i], resolvedArguments));
}
}
if (candidates.isEmpty()) {
throw new JibeRuntimeException("Method " + methodId + " could not be found");
}
Double bestGuess = null;
MethodHolder bestCandidate = null;
for (MethodHolder candidate : candidates) {
double guess = candidate.getQuality();
if (bestGuess == null || guess > bestGuess) {
bestGuess = guess;
bestCandidate = candidate;