LanguageLevel (@NotNull String signature, @NotNull LanguageLevel languageLevel) { Set<String> forbiddenApi = getForbiddenApi(languageLevel); if (forbiddenApi == null) return null; if (forbiddenApi.contains(signature)) return languageLevel; if (languageLevel.compareTo(LanguageLevel.HIGHEST) == 0) return null; LanguageLevel nextLanguageLevel = LanguageLevel.values()[languageLevel.ordinal() + 1]; return getLastIncompatibleLanguageLevelForSignature(signature, nextLanguageLevel); }