code: public static void setVarargsElement(JCTree tree, Type varargsElement) {
          switch (tree.getTag()) {
              case APPLY:
                  ((JCMethodInvocation)tree).varargsElement = varargsElement;
                  break;
              case NEWCLASS:
                  ((JCNewClass)tree).varargsElement = varargsElement;
                  break;
              case REFERENCE:
                  ((JCMemberReference)tree).varargsElement = varargsElement;
                  break;
              default:
                  throw new AssertionError("Unexpected tree: " + tree);
          }
      }
docs: set 'varargsElement' on given tree