Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 87679 Details for
Bug 216311
ITD fields on interfaces end up transient with annotation style
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
The ITD aspect using Java @Annotations
Persistability.java (text/java-source), 1019 bytes, created by
Guillaume Lasnier
on 2008-01-23 12:48:34 EST
(
hide
)
Description:
The ITD aspect using Java @Annotations
Filename:
MIME Type:
Creator:
Guillaume Lasnier
Created:
2008-01-23 12:48:34 EST
Size:
1019 bytes
patch
obsolete
> > >import org.aspectj.lang.annotation.Aspect; >import org.aspectj.lang.annotation.Before; >import org.aspectj.lang.annotation.DeclareParents; >import org.aspectj.lang.annotation.Pointcut; > > >@Aspect >public class Persistability { > > static class Persistable implements IPersistable { > > private static final long serialVersionUID = 7120491865883787353L; > > private int id; > > public Persistable() { > super(); > } > > public int getId() { > return id; > } > > public void setId(int id) { > this.id = id; > } > > } > > @DeclareParents(value = "PersistabilityTest", defaultImpl = Persistable.class) > private IPersistable observable; > > @Pointcut("initialization(IPersistable.new(..)) && this(bean) && !this(Persistable)") > void init(IPersistable bean) { > } > > @Before("init(bean)") > public void beforeInit(IPersistable bean) { > bean.setId(System.identityHashCode(bean)); > } > >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 216311
:
87678
| 87679 |
87680