import java.util.*; import java.lang.annotation.*; import java.lang.ref.*; class Product {} class ProductType{} class Branch {} class Revision {} interface AssociationSource { Link getTarget(); void setTarget(Link _target); } aspect ExtendProduct { Link AssociationSource._target = null; public Link AssociationSource.getTarget() { return _target; } public void AssociationSource.setTarget(Link _target) { this._target = _target; } declare parents : ProductType implements AssociationSource; /* declare parents : Product implements AssociationSource; declare parents : Branch implements AssociationSource; */ } class Link {//extends SoftReference { /* @SuppressWarnings("unchecked") Link(List endPoints) { super(endPoints); } @SuppressWarnings("unchecked") public List getEndPoints() { return (List)get(); } */ }