public RouteBuilder path(String prefix, String pathPattern) {
        prefix = ensureAbsolutePath(prefix, "prefix");
        if (pathPattern.isEmpty()) {
            return path(prefix);
        }

        if (!prefix.endsWith("/")) {
            prefix += '/';
        }

        if ("/".equals(prefix)) {
            // pathPrefix is not specified or "/".
            return path(pathPattern);
        }

        if (pathPattern.startsWith("/")) {
            return path(concatPaths(prefix, pathPattern));
        }

        if (pathPattern.startsWith(EXACT)) {
            return exact(concatPaths(prefix, pathPattern.substring(EXACT.length())));
        }

        if (pathPattern.startsWith(PREFIX)) {
            return pathPrefix(concatPaths(prefix, pathPattern.substring(PREFIX.length())));
        }

        if (pathPattern.startsWith(GLOB)) {
            final String glob = pathPattern.substring(GLOB.length());
            return pathMapping(globPathMapping(prefix, glob, 0));
        }

        return pathMapping(new RegexPathMappingWithPrefix(prefix, getPathMapping(pathPattern)));
    }
Sets the {@link Route} to match the specified {@code prefix} and {@code pathPattern}. The mapped
{@link HttpService} is found when a {@linkplain ServiceRequestContext#path() path} is under
the specified {@code prefix} and the rest of the path matches the specified {@code pathPattern}.

@see #path(String)
core/src/main/java/com/linecorp/armeria/server/RouteBuilder.java