String action = fullAction.substring(fullAction.lastIndexOf(".") + 1);
controllerObject = cachedControllers.get(controller);
if (controllerObject == null) {
logger.debug("Did not find handler {} for [{} {}]", controller, route.method, route.path);
throw new ActionNotFoundException(fullAction, new Exception("Controller " + controller + " not found"));
}
// find actionMethod on target
actionMethod = findActionMethod(action, controllerObject);
if (actionMethod == null) {
logger.debug("Did not find handler method {}.{} for [{} {}]", controller, action, route.method, route.path);
throw new ActionNotFoundException(fullAction, new Exception("No method public static void " + action + "() was found in class " + controller));
}
return new RouterHandler(controllerObject, actionMethod, route);
}