HierarchyTreeStructure (@NotNull String typeName, @NotNull PsiElement psiElement) { if (getSupertypesHierarchyType().equals(typeName)) { return new PySuperTypesHierarchyTreeStructure((PyClass)psiElement); } else if (getSubtypesHierarchyType().equals(typeName)) { return new PySubTypesHierarchyTreeStructure((PyClass)psiElement); } else if (getTypeHierarchyType().equals(typeName)) { return new PyTypeHierarchyTreeStructure((PyClass)psiElement); } else { LOG.error("unexpected type: " + typeName); return null; } }