code: protected String convertPattern(String pattern) {
  
      boolean wildcard = false;
      char[] chars = pattern.toCharArray();
      StringBuilder buffer = new StringBuilder(chars.length + 8);
      int i = 0;
      while (i < chars.length) {
        char c = chars[i];
        if ((c == '*') || (c == '?')) {
          wildcard = true;
        }
        int next = process(chars, i, buffer);
        assert (next > i);
        i = next;
      }
      if (isRequireWildcard() && !wildcard) {
        return null;
      } else {
        return buffer.toString();
      }
    }
docs: This method converts the given {@code pattern} to a {@link Pattern#compile(String) regex-pattern}.
  
  @param pattern is the pattern to convert.
  @return the converted regex-pattern or {@code null} if {@link #isRequireWildcard()} is {@code true} and the given
  {@code pattern} contains no wildcard ('*' or '?').