-
-
Notifications
You must be signed in to change notification settings - Fork 197
/
0405classContent.txt
97 lines (49 loc) · 4.85 KB
/
0405classContent.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
Class Content
Classes and Interfaces
noreferences
@@description
<p>
A class can contain any of the following items. <a href="interfaceDefinition.html">Interfaces</a> are limited to those indicated as <font color="red">[Allowed in interfaces]</font>. A <a href="Traits.html">trait</a> can contain most of the items, indicated as indicated as <font color="green">[Allowed in traits]</font>.
</p>
<ul>
<li><b><a href="UmpleComments.html">Comments</a></b> describe the intent of your class (or interface), and any other elements in the class.<font color="red">[Allowed in interfaces]</font> <font color="green">[Allowed in traits]</font></li>
<br />
<li><b><a href="isAclause.html">isA directives</a></b> that specify a superclass to your class (i.e. a Supervisor could be descrbied as "isA Person"). A class can only have one isA clause referring to another class, but can have many referring to traits or interfaces. <font color="red">[More than one allowed in interfaces]</font> <font color="green">[More than one allowed in traits]</font></li>
<br />
<li>An <b>abstract;</b> keyword, specifying that the class is abstract (cannot be instantiated, must have at least one concrete subclass).</li>
<br />
<li><b><a href="Dependclause.html">Depend directives</a></b> that describe external dependencies that might be used by your class within methods <font color="red">[Allowed in interfaces]</font> <font color="green">[Allowed in traits]</font>.</li>
<br />
<li><b><a href="AttributeDefinition.html">Attributes</a></b> describing simple data that can be found in any element of the class (i.e. name, dob, amount) <font color="green">[Allowed in traits]</font>. These can be preceded by the keyword <b>const</b> to declare constants.</li>
<br />
<li><b><a href="InlineAssociations.html">Inline associations</a></b> that define links to instances of other classes (or to other instances of this class). <font color="green">[Allowed in traits]</font> (can also be <a href="IndependentlyDefinedAssociations.html">specified outside classes</a>) </li>
<br />
<li><b><a href="MethodDefinition.html">Methods</a></b> that provide behaviour for the class. <font color="red">[Allowed in interfaces, but with no method body]</font> <font color="green">[Allowed in traits]</font> (state events are also methods, and <a href="State-DependentMethods.html">methods can also be specified in states</a>)</li>
<br />
<li><b><a href="EnumerationDefinition.html">Enumerations</a></b> for use inside this class (can also be specified outside classes)</li>
<br />
<li><b><a href="BasicStateMachines.html">State machine definitions</a></b> that describe declaratively attributes that change value in certain behaviour patterns in response to actions such as method calls. <font color="green">[Allowed in traits]</font> </li>
<br />
<li><b><a href="SingletonPattern.html">A singleton directive</a></b> that limits the system to only one instance of this class (e.g. there may only be one Bank in a banking system)<font color="green">[Allowed in traits]</font></li>
<br />
<li><b><a href="ImmutablePattern.html">An immutable directive</a></b> that ensures that once constructed, an instance cannot be modified (under development).<font color="green">[Allowed in traits]</font></li>
<br />
<li><b><a href="KeysforEqualityandHashing.html">Key directives</a></b> indicating which attributes (or in future, associations) are going to be used to define when one element is equal to another.<font color="green">[Allowed in traits]</font></li>
<br />
<li><a href="BasicTemplates.html"><b>Generation templates</b> and <b>emit methods</b></a> for generating string output.</li>
<br />
<li><a href="SimpleConstraints.html"><b>Invariant constraints</b></a>. These are Boolean expressions that limit the values of attributes and other elements. <font color="green">[Allowed in traits]</font> (other types of constraints can be specified in methods)</li>
<br />
<li><b><a href="BasicMixsets.html">Mixset definitions</a></b> that themselves contains other items that can be in classes. These allow for conditional compilation and are activated by use statements elsewhere.<font color="green">[Allowed in traits]</font></li>
<br />
<li><b>Class definitions nested inside this class</b> that define subclass of this class as an alternative to using the isA clause. (these are not inner classes; those are defined as below)</li>
<br />
<li><b><a href="TracingBasics.html">Trace directives</a></b> to direct generation of traces from the code. <font color="green">[Allowed in traits]</font></li>
<br />
<li>An inner class, specified either by the keyword <b>inner</b> or <b>static</b>, followed by a class definition. These are only relevant to Java generation.</li>
<br />
<li>Several other items to be documented later including the ability to colour classes in diagrams, and to specify test cases.</li>
<br />
</ul>
@@syntax
[[classContent]] [[traitContent]]