resultMethod = elementFactory.createConstructor(fromMethod.getName());
} else {
resultMethod = elementFactory.createMethod(fromMethod.getName(), returnType);
}
final PsiTypeParameterList fromMethodTypeParameterList = fromMethod.getTypeParameterList();
if (null != fromMethodTypeParameterList) {
PsiTypeParameterList typeParameterList = PsiMethodUtil.createTypeParameterList(fromMethodTypeParameterList);
if (null != typeParameterList) {
resultMethod.addAfter(typeParameterList, resultMethod.getModifierList());
}
}