| Summary: | [Xtend] support for property declaration | ||
|---|---|---|---|
| Product: | [Tools] Xtend | Reporter: | Sven Efftinge <sven.efftinge> |
| Component: | Core | Assignee: | Project Inbox <xtend-inbox> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P3 | CC: | jan, stevemash |
| Version: | 2.2.0 | Flags: | sven.efftinge:
juno+
|
| Target Milestone: | M7 | ||
| Hardware: | PC | ||
| OS: | Mac OS X - Carbon (unsup.) | ||
| Whiteboard: | |||
| Bug Depends on: | 373184 | ||
| Bug Blocks: | |||
MAybe we want to solve this with bug #373184 If a field is annotated with @org.eclipse.xtend.lib.Property a getter is generated if it doesn't exist. A setter is generated if the field is not a final field. The field is renamed to _<fieldName> so that references to fieldName are bound to the getter and the setter within the class. pushed to master Requested via bug 522520. -M. |
adding a keyword ('property'?) in front of a field declaration will automatically result in a getter and setter method. The default visibility of them will be public. but can be specified if different. the Java field will always be private. A setter or getter is only generated if such a method doesn't already exist, i.e. wasn't declared explicitly.