boolean (PsiClass psiClass, Collection<? extends InternalNameMatcher> matchers) { for (InternalNameMatcher matcher : matchers) { if (matcher.matches(psiClass)) { //qualified name is unique among file's classes if (matcher instanceof InternalNameMatcher.ByQualifiedName) { matchers.remove(matcher); } return true; } } return false; }