01: package org.andromda.metafacades.emf.uml2;
02:
03: import java.util.ArrayList;
04: import java.util.Collection;
05:
06: /**
07: * MetafacadeLogic implementation for
08: * org.andromda.metafacades.uml.TemplateArgumentFacade.
09: *
10: * @see org.andromda.metafacades.uml.TemplateArgumentFacade
11: */
12: public class TemplateArgumentFacadeLogicImpl extends
13: TemplateArgumentFacadeLogic {
14: public TemplateArgumentFacadeLogicImpl(
15: final org.eclipse.uml2.TemplateParameterSubstitution metaObject,
16: final String context) {
17: super (metaObject, context);
18: }
19:
20: /**
21: * @see org.andromda.metafacades.uml.TemplateArgumentFacade#getElement()
22: */
23: protected java.lang.Object handleGetElement() {
24: // TODO: Be sure it works with RSM / MD11.5
25: // It may be ownedActual
26: Collection actuals = new ArrayList(this.metaObject.getActuals());
27: if (actuals.isEmpty()) {
28: return null;
29: }
30: return actuals.iterator().next();
31: }
32: }
|