String (GrParameter parameter, GrExpression expression, String varName) { StringBuilder buffer = new StringBuilder(); final PsiModifierList modifierList = parameter.getModifierList(); buffer.append(modifierList.getText().trim()); if (buffer.length() > 0) buffer.append(' '); final GrTypeElement typeElement = parameter.getTypeElementGroovy(); if (typeElement != null) { buffer.append(typeElement.getText()).append(' '); } if (buffer.length() == 0) { buffer.append("def "); } buffer.append(varName).append(" = ").append(expression.getText()); return buffer.toString(); }