Chapter 7. Object orientation, Groovy style
This chapter covers
- Defining classes and scripts
- Object-oriented features: inheritance, interfaces, multimethods, and traits
- Working with GroovyBeans
- Advanced syntax features: GPath, spread operators, and command chains
Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius—and a lot of courage—to move in the opposite direction.
Albert Einstein
There’s a common misconception about scripting languages. Because a scripting language might support a less rigid approach to typing and provide some initially surprising syntax shorthands, it may be perceived as a nice new toy for hackers rather than a language suitable for serious OOP. This reputation stems ...
Get Groovy in Action, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.