Chapter 3. Using Groovy Language Features

In this chapter, we will cover:

  • Searching strings with regular expressions
  • Writing less verbose Java Beans with Groovy Beans
  • Inheriting constructors in Groovy classes
  • Adding the cloning functionality to Groovy Beans
  • Defining code as data in Groovy
  • Defining data structures as code in Groovy
  • Implementing multiple inheritance in Groovy
  • Adding a functionality to the existing Java/Groovy classes
  • Defining type-checking rules for dynamic code
  • Adding automatic logging to Groovy classes

Introduction

This chapter is all about what makes Groovy a very productive and fun programming language.

Groovy popularity builds on certain features of the language that are simply done right, such as closures or builders and are particularly ...

Get Groovy 2 Cookbook 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.