In groovy, the bitwise operators can be overridden with the leftShift (<<)
and rightShift (>>)
methods defined on the class. It's idiomatic groovy to use the leftShift
method for append actions on strings, buffers, streams, arrays, etc and thats what you're seeing here.
For example:
- The overloaded
leftShift
methods on OutputStream
which are used to append bytes, an InputStream
, or an Object
to the stream.
List
, which also uses it as an append
You are looking at a grails tag lib, so out represents the page that's being rendered. The results of this taglib will be added to the output buffer that will be rendered to the client.
out << foo
might be syntax forreturn foo
. Or out is some kind of object with a funky overload that results in the same thing, i.e. the<<
operator on theout
object simply returns it's parameter value...