private static @Nullable PsiMethod createMethodIfNotExists(PsiClass aClass, final PsiMethod template) {
    PsiMethod existing = aClass.findMethodBySignature(template, false);
    return existing == null || !existing.isPhysical() ? template : null;
  }
private static @Nullable PsiMethod createMethodIfNotExists(PsiClass aClass, final PsiMethod template)