@Nullable
    private Node<V> checkNode(Node<V> node, String path, int begin, boolean exact, IntHolder next) {
        switch (node.type) {
            case EXACT:
                final int len = node.path.length();
                if (!path.regionMatches(begin, node.path, 0, len)) {
                    // A given path does not start with the path of this node.
                    return null;
                }
                if (len == path.length() - begin) {
                    // Matched. No more input characters.
                    // If this node is not added by a user, then we should return a catch-all child
                    // if it exists. But if 'exact' is true, we just return this node to make caller
                    // have the exact matched node.
                    if (exact || !node.values.isEmpty() || node.catchAllChild == null) {
                        return node;
                    }

                    return node.catchAllChild;
                }
                next.value = begin + len;
                break;
            case PARAMETER:
                // Consume characters until the delimiter '/' as a path variable.
                final int delimSlash = path.indexOf('/', begin);

                if (delimSlash < 0) {
                    final String pathVerb = findVerb(path, begin);
                    if (pathVerb == null) {
                        // No more delimiter.
                        return node;
                    } else {
                        final Node<V> verb = node.children.get(':');
                        return verb != null && verb.path.equals(pathVerb) ? verb : node;
                    }
                }

                if (path.length() == delimSlash + 1) {
                    final Node<V> trailingSlashNode = node.children.get('/');
                    return trailingSlashNode != null ? trailingSlashNode : node;
                }
                next.value = delimSlash;
                break;
            default:
                throw new Error("Should not reach here");
        }
        return continueWalking();
    }
Checks a {@link Node} which is mapped to the given {@code path}.
Returns {@code null} if the given {@code path} does not start with the path of this {@link Node}.
Returns {@link #continueWalking()} if the given {@code path} has to visit {@link Node#children}.
core/src/main/java/com/linecorp/armeria/server/RoutingTrie.java