String () { String parametersList = Arrays.stream(getChosenParameters()) .filter(data -> data.passAsParameter) .map(data -> data.type.getPresentableText()) .reduce((result, item) -> result + ", " + item) .orElse(""); String returnTypeString = myReturnType == null || PsiTypes.voidType().equals(myReturnType) ? "{}" : myReturnType.getPresentableText(); return "(" + parametersList + ") -> " + returnTypeString; }