StringBuilder () { StringBuilder buffer = new StringBuilder(); final String visibilityString = VisibilityUtil.getVisibilityString(getVisibility()); if (myCreateInnerClassRb.isSelected()) { buffer.append(visibilityString); if (buffer.length() > 0) { buffer.append(" "); } if (isMakeStatic()) { buffer.append("static "); } buffer.append("class "); buffer.append(myInnerClassName.getText()); if (myTypeParameterList != null) { buffer.append(myTypeParameterList.getText()); buffer.append(" "); } buffer.append("{\n"); buffer.append(INDENT); buffer.append("public "); buffer.append(myInnerClassName.getText()); methodSignature(buffer); buffer.append("\n}"); } else { buffer.append("new Object(){\n"); buffer.append(INDENT); buffer.append("private "); buffer.append(PsiFormatUtil.formatType(myReturnType, 0, PsiSubstitutor.EMPTY)); buffer.append(" "); buffer.append(myMethodName.getText()); methodSignature(buffer); buffer.append("\n}."); buffer.append(myMethodName.getText()); buffer.append("("); buffer.append(StringUtil.join(myInputVariables, variableData -> variableData.name, ", ")); buffer.append(")"); } return buffer; }