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