private static @NotNull PsiMethod createMethod(@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);
  }
private static @NotNull PsiMethod createMethod(@NotNull JVMElementFactory factory,
                                                 @NotNull PsiMethod method, PsiElement target)