Set<PsiType> (PsiType type, PsiElement context, Set<PsiType> result) { final PsiType[] superTypes = type.getSuperTypes(); if (superTypes.length == 0 && type instanceof PsiArrayType) { final Project project = context.getProject(); final PsiElementFactory factory = JavaPsiFacade.getElementFactory(project); result.add(factory.createTypeFromText(CommonClassNames.JAVA_IO_SERIALIZABLE, context)); result.add(factory.createTypeFromText(CommonClassNames.JAVA_LANG_CLONEABLE, context)); result.add(factory.createTypeFromText(CommonClassNames.JAVA_LANG_OBJECT, context)); } for (PsiType superType : superTypes) { if (result.add(superType)) collectSuperTypes(superType, context, result); } return result; }