O'Reilly logo

Groovy Programming by John Savage, Kenneth Barclay

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

APPENDIX I MORE ON CLASSES

This appendix considers a number of aspects of classes that we chose to defer when first introducing them in Chapter 12. We consider the visibility of properties and their getter and setter methods and we demonstrate how certain method names are reserved to act as method definitions for the standard operators. We also discuss the support offered by Groovy for navigating through a network of objects.

I.1 PROPERTIES AND VISIBILITY

We have seen how properties can significantly reduce the size of code when defining a class. Groovy seeks to unify the notion of instance fields and methods through the use of properties. Further, we also know that (public) properties in a class give rise to public getters and setters automatically ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required