Пример #1
0
 /**
  * Add Router to list
  *
  * @param controller controller class
  * @param routers router list
  */
 @SuppressWarnings("unused")
 private void addController(Class controller, List<Router> routers) {
   Method[] methods = controller.getDeclaredMethods();
   for (Method method : methods) {
     Route route = method.getAnnotation(Route.class);
     if (route != null) {
       routers.add(new Router(method, route.route(), route.method()));
     }
   }
 }