MinusculeMatcher (@NotNull String pattern, boolean preferStartMatches) { NameUtil.MatcherBuilder builder = NameUtil.buildMatcher(pattern).withCaseSensitivity(NameUtil.MatchingCaseSensitivity.NONE); if (preferStartMatches) { builder = builder.preferringStartMatches(); } return builder.build(); }