Ejemplo 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;
 }
Ejemplo 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();
  }
Ejemplo n.º 3
0
 @Override
 public String toString() {
   return "route=" + route.toString() + ", leavingDate=" + leavingDate;
 }