public PathPattern(T target, String text, boolean named, int defaultHttpMethods) {
        this.target = target;
        this.named = named;

        if (text == null) {
            return;
        }

        String[] items = text.split(";");

        if (items.length > 1) {
            httpMethods = HttpMethods.parse(items[1]);
        } else {
            httpMethods = defaultHttpMethods;
        }

        try {
            parseAllElement(items[0]);
        } catch (IOException ex) {
            throw new PatternException(ex.getMessage() + ". Input was: " + text);
        }
    }