@@ -0,0 +1,1976 @@
+/*%0A * Copyright 2017 the original author or authors.%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *       http://www.apache.org/licenses/LICENSE-2.0%0A *%0A *  Unless required by applicable law or agreed to in writing, software%0A *  distributed under the License is distributed on an %22AS IS%22 BASIS,%0A *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A *  See the License for the specific language governing permissions and%0A *  limitations under the License.%0A */%0A%0Apackage leap.web.route;%0A%0Aimport leap.core.web.path.PathTemplate;%0Aimport leap.lang.ExtensibleBase;%0A%0Aimport java.util.Map;%0A%0Apublic class SimpleNestedRoute extends ExtensibleBase implements NestedRoute %7B%0A%0A    private final Object       source;%0A    private final String       method;%0A    private final PathTemplate pathTemplate;%0A    private final Routes       routes;%0A%0A    public SimpleNestedRoute(Object source, PathTemplate pathTemplate, Routes routes) %7B%0A        this(source, %22*%22, pathTemplate, routes);%0A    %7D%0A%0A    public SimpleNestedRoute(Object source, String method, PathTemplate pathTemplate, Routes routes) %7B%0A        this.source = source;%0A        this.method = method;%0A        this.pathTemplate = pathTemplate;%0A        this.routes = routes;%0A    %7D%0A%0A    @Override%0A    public Route match(String method, String path, Map%3CString, Object%3E inParameters, Map%3CString, String%3E outVariables) %7B%0A        return routes.match(method, path, inParameters, outVariables);%0A    %7D%0A%0A    @Override%0A    public Object getSource() %7B%0A        return source;%0A    %7D%0A%0A    @Override%0A    public String getMethod() %7B%0A        return method;%0A    %7D%0A%0A    @Override%0A    public PathTemplate getPathTemplate() %7B%0A        return pathTemplate;%0A    %7D%0A%0A    @Override%0A    public String toString() %7B%0A        return this.getClass().getSimpleName() + %22(%22 + method + %22 %22 + pathTemplate + %22)%22;%0A    %7D%0A%7D%0A

add SimpleNestedRoute