public static PsiMethod createMacroMethod(@NotNull PsiMethod prototype) {
    GrLightMethodBuilder syntheticMacro = new GrLightMethodBuilder(prototype.getManager(), prototype.getName());
    syntheticMacro.setModifiers(new String[]{PsiModifier.STATIC});
    PsiParameterList list = prototype.getParameterList();
    for (int i = 1; i < list.getParametersCount(); ++i) {
      PsiParameter actualParameter = list.getParameter(i);
      String generatedParameterType;
      String name;
      if (actualParameter == null) {
        generatedParameterType = CommonClassNames.JAVA_LANG_OBJECT;
        name = "expression";
      }
      else {
        PsiType type = actualParameter.getType();
        if (!type.equals(PsiTypes.nullType())) {
          generatedParameterType = AST_TO_EXPR_MAPPER.getOrDefault(type.getCanonicalText(), CommonClassNames.JAVA_LANG_OBJECT);
        }
        else {
          generatedParameterType = CommonClassNames.JAVA_LANG_OBJECT;
        }
        name = actualParameter.getName();
      }
      syntheticMacro.addParameter(
        new GrLightParameter(name,
                             PsiType.getTypeByName(generatedParameterType, prototype.getProject(), GlobalSearchScope.allScope(prototype.getProject())),
                             prototype));
    }
    syntheticMacro.setNavigationElement(prototype);
    syntheticMacro.setOriginInfo(MACRO_ORIGIN_INFO);
    return syntheticMacro;
  }
public static PsiMethod createMacroMethod(@NotNull PsiMethod prototype)