method pointer

The method pointer operator (.&) for closure conversion.

Groovy Method References & Method Pointers Explained with 12 Examples

Groovy method references and method pointers with the .& operator. 12 examples covering instance, static, and constructor references. Tested on Groovy 5.x. “A method pointer is a closure that was always hiding inside your method – Groovy just gives you the key to unlock it.” Kent Beck, Smalltalk Best Practice Patterns Last Updated: March 2026 | Tested on: Groovy 5.x, Java 17+ | Difficulty: Intermediate | Reading Time: 18 minutes If you’ve been working through the closures section of this ... Read More