code: public static String toJava(String regex) {
          if (StringUtils.isBlank(regex)) {
              return regex;
          } else {
              return regex.replaceAll("\\.", "\\\\.")
                      .replaceAll("\\*",".*");
          }
      }
docs: /* --- Public methods ---