Set<String> (PsiClass @NotNull [] classes) { if (classes.length == 0) { return Collections.emptySet(); } Set<String> names = new HashSet<>(classes.length); for (PsiClass aClass : classes) { ContainerUtil.addIfNotNull(names, aClass.getName()); } return names; }