private void collectJoins(
      QueryBuilderScopeContext qb, MethodReference methodReference, String name) {

    if (!collectJoins
        || !Arrays.asList("join", "leftJoin", "rightJoin", "innerJoin").contains(name)) {
      return;
    }

    String join = PsiElementUtils.getMethodParameterAt(methodReference, 0);
    String alias = PsiElementUtils.getMethodParameterAt(methodReference, 1);
    if (join != null && alias != null) {
      qb.addJoin(alias, new QueryBuilderJoin(join, alias));
    }
  }
  private void collectParameter(
      QueryBuilderScopeContext qb, MethodReference methodReference, String name) {

    if (!collectParameter || !Arrays.asList("where", "andWhere").contains(name)) {
      return;
    }

    String value = PsiElementUtils.getMethodParameterAt(methodReference, 0);
    if (value != null) {
      Matcher matcher = Pattern.compile(":(\\w+)", Pattern.MULTILINE).matcher(value);
      while (matcher.find()) {
        qb.addParameter(matcher.group(1));
      }
    }
  }