PsiEnumConstantInitializer () { PsiEnumConstantInitializer initializingClass = getInitializingClass(); if (initializingClass != null) return initializingClass; PsiElementFactory factory = JavaPsiFacade.getElementFactory(getProject()); PsiEnumConstantInitializer initializer = factory.createEnumConstantFromText("foo{}", null).getInitializingClass(); LOG.assertTrue(initializer != null); PsiExpressionList argumentList = getArgumentList(); if (argumentList != null) { return (PsiEnumConstantInitializer)addAfter(initializer, argumentList); } else { return (PsiEnumConstantInitializer)addAfter(initializer, getNameIdentifier()); } }