Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 437509

Summary: Introduce replacement for @Data
Product: [Tools] Xtend Reporter: Sven Efftinge <sven.efftinge>
Component: CoreAssignee: Project Inbox <xtend-inbox>
Status: CLOSED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: st.oehme
Version: 2.6.0   
Target Milestone: ---   
Hardware: PC   
OS: Mac OS X   
Whiteboard: v2.7
Bug Depends on:    
Bug Blocks: 381198, 381209, 381498, 389730, 422830    

Description Sven Efftinge CLA 2014-06-16 04:17:49 EDT
@Data suffers from the "renaming field problem" (i.e. bug #382914) which renders it useless for deserialization frameworks which set the fields (e.g. JPA, Hibernate, GSON ...). Also we cannot change @Data as it would break existing code.

A new annotation for value objects should be introduced. We could implement the contract described in [1]. Also the name ValJO is nice, though @ValueObject might be more readable.

[1] - http://blog.joda.org/2014/03/valjos-value-java-objects.html

To avoid further miss use of @Data (or @ValueObject) I have files bug #437508. This means that @ValueObject could and should be more strict with respect to immutability.
Comment 1 Stefan Oehme CLA 2014-06-26 08:33:04 EDT
@ValueObject is available on master
Comment 2 Eclipse Webmaster CLA 2017-10-31 11:06:31 EDT
Requested via bug 522520.

-M.
Comment 3 Eclipse Webmaster CLA 2017-10-31 11:17:55 EDT
Requested via bug 522520.

-M.