Using TaggedValue
Click an association element.
Select the TaggedValue tab.
Enter "collection_kind" in the Name and a collection type in the Value. The following collection types can be entered. If this TaggedValue is not set, it is the same as setting "Array".
Array
Set
Select the Association End tab.
Enter “*” for the upper limit in the Multiplicity.
TypeScript Example Code
// ˅
'use strict';
import { Bar } from './bar';
// ˄
export class Foo {
// ˅
// ˄
private bars: Set<Bar>;
// ˅
// ˄
}
// ˅
// ˄
Using Stereotype
Click an association element.
Select the Stereotype tab.
Enter "collection_kind=(Collection type)" in the Name. The following collection types can be entered. If this Stereotype is not set, it is the same as setting "Array".
Array
Set
Select the Association End tab.
Enter “*” for the upper limit in the Multiplicity.
TypeScript Example Code
// ˅
'use strict';
import { Bar } from './bar';
// ˄
export class Foo {
// ˅
// ˄
private bars: Set<Bar>;
// ˅
// ˄
}
// ˅
// ˄
TypeScript Example Code
// ˅
'use strict';
// ˄
export enum Foo {
Red,
Green,
Blue
// ˅
// ˄
}
// ˅
// ˄
TypeScript Example Code
// ˅
'use strict';
// ˄
export class Foo {
// ˅
// ˄
set sum(): number {
// ˅
throw new Error('Not implemented');
// ˄
}
// ˅
// ˄
}
// ˅
// ˄
Using TaggedValue
TypeScript Example Code
// ˅
'use strict';
// ˄
@sealed
export class Foo {
// ˅
// ˄
// ˅
// ˄
}
// ˅
// ˄
Using Stereotype
TypeScript Example Code
// ˅
'use strict';
// ˄
@sealed
export class Foo {
// ˅
// ˄
// ˅
// ˄
}
// ˅
// ˄
TypeScript Example Code
// ˅
'use strict';
// ˄
class Foo {
// ˅
// ˄
// ˅
// ˄
}
// ˅
// ˄
Write namespaces or modules in the User Code Area - which is an area quoted with “˅” and “˄”.
TypeScript Example Code
// ˅
'use strict';
namespace bar {
// ˄
class Foo {
// ˅
// ˄
// ˅
// ˄
}
// ˅
}
// ˄