Skip to end of metadata
Go to start of metadata

We need a simple way to differentiate neatly between fields, properties and methods.

e.g.

Properties

By default the following will always refer to the property - even if you are inside a method on the class Foo unless you are inside a getter or setter.

Fields

If you ever wanna explicitly refer to the field, you can use

Methods

To explicitly refer to a method, we chould say that

would refer to the h() method instead of the getH() method.

Obviously if there are parameters it would be different.

To see a test case, try FieldPropertyMethodDisambiguation.groovy in the TCK

  • No labels