String[] (PsiModifierList list, String[][] keywordSets) { final List<String> ret = new ArrayList<>(); for (int i = 0; i < keywordSets.length; i++) { final String[] keywords = keywordSets[keywordSets.length - i - 1]; boolean containModifierFlag = false; if (list != null) { for (@PsiModifier.ModifierConstant String keyword : keywords) { if (list.hasExplicitModifier(keyword)) { containModifierFlag = true; break; } } } if (!containModifierFlag) { ContainerUtil.addAll(ret, keywords); } } return ArrayUtilRt.toStringArray(ret); }