groovy

Removing @Property Syntax

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.0-JSR-5
  • Fix Version/s: 1.0-JSR-6
  • Component/s: None
  • Labels:
    None
  • Number of attachments :
    0

Description

Following discussion on the list, the best option forward for an improvement to the @Property syntax was agreed to be John's suggestion, now is the time to action it before the release candidate:

def x

is equivalent to

private x

public getx() {...

public setx {....

and

final x = 1

is equivalent to

private final x = 1

public getx() {...

and

public x, protected x and private x define public, private and
protected fields

If users need to define protected or private acessor functions they
have to do so explicitly.

Activity

Hide
blackdrag blackdrag added a comment -
Show
blackdrag blackdrag added a comment - the new semantic is descibed on http://docs.codehaus.org/display/GroovyJSR/Property+proposal

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: