String (@NotNull String name, String prefix, String suffix, boolean upperCaseStyle) { String[] words = NameUtil.splitNameIntoWords(name); for (int i = 1; i < words.length; i++) { for (String preposition : ourPrepositions) { if (preposition.equalsIgnoreCase(words[i])) { String mainWord = words[i - 1]; if (upperCaseStyle) { mainWord = StringUtil.toUpperCase(mainWord); } else { if (prefix.isEmpty() || StringUtil.endsWithChar(prefix, '_')) { mainWord = StringUtil.toLowerCase(mainWord); } else { mainWord = StringUtil.capitalize(mainWord); } } return prefix + mainWord + suffix; } } } return null; }