Esempio n. 1
0
 public static Route getRoute(
     String method,
     String path,
     String action,
     String params,
     String headers,
     String sourceFile,
     int line) {
   Route route = new Route();
   route.method = method;
   route.path = path.replace("//", "/");
   route.action = action;
   route.routesFile = sourceFile;
   route.routesFileLine = line;
   route.addFormat(headers);
   route.addParams(params);
   route.compute();
   if (Logger.isTraceEnabled()) {
     Logger.trace(
         "Adding ["
             + route.toString()
             + "] with params ["
             + params
             + "] and headers ["
             + headers
             + "]");
   }
   return route;
 }
Esempio n. 2
0
  /* (non-Javadoc)
   * @see java.lang.Object#toString()
   */
  @Override
  public String toString() {
    StringBuilder str = new StringBuilder("RouteList [");

    // Add routes
    for (Route route : getRoutes()) {
      str.append("\n\t" + route.toString());
    }
    str.append("]");

    return str.toString();
  }
 @Override
 public String toString() {
   return "route=" + route.toString() + ", leavingDate=" + leavingDate;
 }