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