PsiMethod (@NotNull JVMElementFactory factory, @NotNull PsiMethod method, PsiElement target) { if (method.isConstructor()) { return factory.createConstructor(method.getName(), target); } return factory.createMethod(method.getName(), PsiTypes.voidType(), target); }