class PatternUtils {
    
    

    public static Pattern strPatternToPattern(final String pattern) {<FILL_FUNCTION_BODY>}
    
    
    
    private PatternUtils() {
        super();
    }
    
}

        final String pat = 
            pattern.replace(".", "\\.").replace("(", "\\(").replace(")", "\\)").
                replace("[","\\[").replace("]","\\]").replace("?","\\?").replace("$","\\$").replace("+","\\+").
                replace("*","(?:.*?)");
        return Pattern.compile('^' + pat + '$');
    
<no_super_class>