PsiMethod[] (PsiField field) { final Project project = field.getProject(); final PsiElementFactory factory = JavaPsiFacade.getElementFactory(project); final PsiMethod getter = GenerateMembersUtil.generateSimpleGetterPrototype(field); final PsiType wrappedType = JavaFxPsiUtil.getWrappedPropertyType(field, project, JavaFxCommonNames.ourReadOnlyMap); LOG.assertTrue(wrappedType != null, field.getType()); getter.setName(PropertyUtilBase.suggestGetterName(PropertyUtilBase.suggestPropertyName(field), wrappedType)); final PsiTypeElement returnTypeElement = getter.getReturnTypeElement(); LOG.assertTrue(returnTypeElement != null); returnTypeElement.replace(factory.createTypeElement(wrappedType)); final PsiCodeBlock getterBody = getter.getBody(); LOG.assertTrue(getterBody != null); final String fieldName = field.getName(); getterBody.getStatements()[0].replace(factory.createStatementFromText("return " + fieldName + ".get();", field)); final PsiMethod propertyGetter = PropertyUtilBase.generateGetterPrototype(field); propertyGetter.setName(JavaCodeStyleManager.getInstance(project).variableNameToPropertyName(fieldName, VariableKind.FIELD) + JavaFxCommonNames.PROPERTY_METHOD_SUFFIX); return new PsiMethod[] {getter, GenerateMembersUtil.annotateOnOverrideImplement(field.getContainingClass(), propertyGetter)}; }