package com.jscape.util.regex;

/**
 * @author Alex Usun
 */
public interface MatcherFactory {

    Matcher matcherFor(String pattern)
            throws OperationException;

    class OperationException
            extends Exception {

        public OperationException() {
        }

        public OperationException(String message) {
            super(message);
        }

        public OperationException(String message, Throwable cause) {
            super(message, cause);
        }

        public OperationException(Throwable cause) {
            super(cause.getMessage() != null ? cause.getMessage() : cause.toString(), cause);
        }

        public OperationException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
            super(message, cause, enableSuppression, writableStackTrace);
        }
    }
}
