code: @Override @DefinedBy(Api.COMPILER_TREE)
      public void printMessage(Diagnostic.Kind kind, CharSequence msg,
              com.sun.source.tree.Tree t,
              com.sun.source.tree.CompilationUnitTree root) {
          printMessage(kind, msg, ((JCTree) t).pos(), root);
      }
docs: Prints a message of the specified kind at the location of the
  tree within the provided compilation unit
  
  @param kind the kind of message
  @param msg  the message, or an empty string if none
  @param t    the tree to use as a position hint
  @param root the compilation unit that contains tree