boolean (final String fqName) { for(PsiType type: myTypesForAll) { if (type.getCanonicalText().equals(fqName)) { return true; } } for(PsiType type: myTypesForMain) { if (type.getCanonicalText().equals(fqName)) { return true; } } return false; }