code: public static void println(Object self, Object value) {
          // we won't get here if we are a PrintWriter
          if (self instanceof Writer) {
              final PrintWriter pw = new GroovyPrintWriter((Writer) self);
              pw.println(value);
          } else {
              System.out.println(InvokerHelper.toString(value));
          }
      }
docs: Print a value formatted Groovy style (followed by a newline) to self
  if it is a Writer, otherwise to the standard output stream.
  
  @param self  any Object
  @param value the value to print
  @since 1.0