I used following code.
class Bike{ def manufacturer; private getManufacturer(){ manufacturer } }
But I was able invoke getter method from another class.
You can't using the private modifier. This is scheduled for Groovy 2.0 I believe
private
Related questions:
1.4m articles
1.4m replys
5 comments
57.0k users