01: package org.andromda.metafacades.emf.uml2;
02:
03: import org.andromda.metafacades.uml.UMLMetafacadeProperties;
04: import org.andromda.metafacades.uml.ValueObject;
05:
06: /**
07: * MetafacadeLogic implementation for
08: * org.andromda.metafacades.uml.ValueObjectAssociationEnd.
09: *
10: * @see org.andromda.metafacades.uml.ValueObjectAssociationEnd
11: */
12: public class ValueObjectAssociationEndLogicImpl extends
13: ValueObjectAssociationEndLogic {
14: public ValueObjectAssociationEndLogicImpl(final Object metaObject,
15: final String context) {
16: super (metaObject, context);
17: }
18:
19: /**
20: * Overridden to provide handling of array names within many type
21: * multiplicities.
22: *
23: * @see org.andromda.metafacades.uml.AssociationEndFacade#getGetterSetterTypeName()
24: */
25: protected String handleGetGetterSetterTypeName() {
26: String name = super .handleGetGetterSetterTypeName();
27: if (this .isMany()) {
28: boolean useArrays = Boolean
29: .valueOf(
30: String
31: .valueOf(this
32: .getConfiguredProperty(UMLMetafacadeProperties.USE_ARRAYS_FOR_MULTIPLICITIES_OF_TYPE_MANY)))
33: .booleanValue();
34: if (useArrays) {
35: if (this .getType() != null) {
36: name = this .getType().getFullyQualifiedArrayName();
37: }
38: }
39: }
40: return name;
41: }
42:
43: /**
44: * @see org.andromda.metafacades.uml.ValueObjectAssociationEnd#isValueObjectType()
45: */
46: protected boolean handleIsValueObjectType() {
47: return this .getType() instanceof ValueObject;
48: }
49: }
|