code: private void setVarargsIfNeeded(JCTree tree, Type varargsElement) {
          if (varargsElement != null) {
              switch (tree.getTag()) {
                  case APPLY: ((JCMethodInvocation)tree).varargsElement = varargsElement; break;
                  case NEWCLASS: ((JCNewClass)tree).varargsElement = varargsElement; break;
                  default: throw new AssertionError();
              }
          }
      }
docs: Set varargsElement field on a given tree (must be either a new class tree
  or a method call tree)