PsiClass (@NotNull PsiClass aClass, @NotNull String name) { final PsiClass classNavigationElement = (PsiClass)aClass.getNavigationElement(); final PsiClass classCopy = (PsiClass)classNavigationElement.copy(); classCopy.setName(name); return classCopy; }