private static void buildHandler(String moduleUrl, Class<?> clazz) { for (Method m : clazz.getDeclaredMethods()) { WebMethod wm = m.getAnnotation(WebMethod.class); if (wm != null) { Handler handler = new Handler(clazz, m.getName()); if (StringUtils.isNotEmpty(wm.name())) { handlers.put(moduleUrl + "/" + wm.name(), handler); } else { handlers.put(moduleUrl + "/" + m.getName(), handler); } } } }