Return type | Name and parameters |
---|---|
Writer
|
leftShift(Object value)
Overloads the leftShift operator for Writer to allow an object to be written using Groovy's default representation for the object. |
PrintWriter
|
newPrintWriter()
Create a new PrintWriter for this Writer. |
Object
|
withPrintWriter(Closure closure)
Create a new PrintWriter for this Writer. |
Object
|
withWriter(Closure closure)
Allows this writer to be used within the closure, ensuring that it is flushed and closed before this method returns. |
void
|
write(Writable writable)
A helper method so that dynamic dispatch of the writer.write(object) method will always use the more efficient Writable.writeTo(writer) mechanism if the object implements the Writable interface. |
addShutdownHook
, any
, any
, asBoolean
, asType
, collect
, collect
, collect
, dump
, each
, eachMatch
, eachMatch
, eachWithIndex
, every
, every
, find
, find
, findAll
, findAll
, findIndexOf
, findIndexOf
, findIndexValues
, findIndexValues
, findLastIndexOf
, findLastIndexOf
, findResult
, findResult
, getAt
, getMetaClass
, getMetaPropertyValues
, getProperties
, grep
, grep
, hasProperty
, identity
, inject
, inject
, inspect
, invokeMethod
, is
, isCase
, iterator
, metaClass
, print
, print
, printf
, printf
, println
, println
, println
, putAt
, respondsTo
, respondsTo
, setMetaClass
, split
, sprintf
, sprintf
, toString
, use
, use
, use
, with
, withTraits
Overloads the leftShift operator for Writer to allow an object to be written using Groovy's default representation for the object.
value
- an Object whose default representation will be written to the WriterCreate a new PrintWriter for this Writer.
Create a new PrintWriter for this Writer. The writer is passed to the closure, and will be closed before this method returns.
closure
- the closure to invoke with the PrintWriterAllows this writer to be used within the closure, ensuring that it is flushed and closed before this method returns.
closure
- the closure that the writer is passed intoA helper method so that dynamic dispatch of the writer.write(object) method will always use the more efficient Writable.writeTo(writer) mechanism if the object implements the Writable interface.
writable
- an object implementing the Writable interface