1 package org.andromda.core.simpleuml;
2
3
4 import org.andromda.core.uml14.UMLStaticHelper;
5 import org.omg.uml.foundation.core.AssociationEnd;
6
7 /***
8 * Implements operations for querying an assocation from the perspective
9 * of one of the assocation ends.
10 *
11 * @author <A HREF="http://www.amowers.com">Anthony Mowers</A>
12 */
13 public class DirectionalAssociationEnd
14 extends org.andromda.core.uml14.DirectionalAssociationEnd
15 {
16 private UMLStaticHelper scriptHelper;
17
18 public DirectionalAssociationEnd(
19 UMLStaticHelper scriptHelper,
20 AssociationEnd associationEnd)
21 {
22 super(associationEnd);
23 this.scriptHelper = scriptHelper;
24 }
25
26 public AssociationEnd getSource()
27 {
28 return PAssociationEnd.newInstance(scriptHelper,associationEnd);
29 }
30
31
32 public AssociationEnd getTarget()
33 {
34 return PAssociationEnd.newInstance(scriptHelper,getOtherEnd());
35 }
36
37
38 }