final PsiReferenceList throwsList = psiMethod.getThrowsList();
for (PsiClassType psiClassType : throwsList.getReferencedTypes()) {
methodBuilder.withException(psiClassType);
}
final PsiParameterList parameterList = psiMethod.getParameterList();
final StringBuilder paramString = new StringBuilder();
int parameterIndex = 0;
for (PsiParameter psiParameter : parameterList.getParameters()) {
final PsiType psiParameterType = psiSubstitutor.substitute(psiParameter.getType());
final String generatedParameterName = StringUtils.defaultIfEmpty(psiParameter.getName(), "p" + parameterIndex);
methodBuilder.withParameter(generatedParameterName, psiParameterType);
parameterIndex++;