Previous | UML Classes | Table of Contents | UML Packages | Next |
(normative)
UML keywords are reserved words that are an integral part of the UML notation and normally appear as text annotations attached
to a UML graphic element or as part of a text line in a UML diagram. These words have special significance in the context
in which they are defined and, therefore, cannot be used to name user-defined model elements where such naming would result
in ambiguous interpretation of the model. For example, the keyword trace is a system-defined stereotype of Abstraction (see
Annex C, Standard Stereotype s) and, therefore, cannot be used to define any user-defined stereotype.
In UML, keywords are used for four different purposes:
• To distinguish a particular UML concept (metaclass) from others sharing the same general graphical form. For instance, the «interface» keyword in the header box of a classifier rectangle is used to distinguish an Interface from other kinds of Classifiers.
• To distinguish a particular kind of relationship between UML concepts (meta-association) from other relationships sharing the same general graphical form. For example, dashed lines between elements are used for a number of different relationships, including Dependencies , relationships between UseCases and an extending UseCases , and so on.
• To specify the value of some modifier attached to a UML concept (meta-attribute value). Thus, the keyword «singleExecution» appearing within an Activity signifies that the isSingleExecution attribute of that Activity is true.
• To indicate a Standard Stereotype (see Annex C, Standard Stereotype s). For example, the «modelLibrary» keyword attached to a package identifies that the package contains a set of model elements intended to be shared by multiple models.
Keywords are always enclosed in guillemets («keyword»), which serve as visual cues to more readily distinguish when a keyword
is being used. (Note that guillemets are a special kind of quotation marks and should not be confused with or replaced by
duplicated greater than (>>) or less than (<<) symbols, except in situations where the available character set may not include
guillemets.) In addition to identifying keywords, guillemets are also used to distinguish the usage of stereotypes defined
in user profiles. This means that:
1. Not all words appearing between guillemets are necessarily keywords (i.e., reserved words), and
2. words appearing in guillemets do not necessarily represent stereotypes.
If multiple keywords and/or stereotype names apply to the same model element, they all appear between the same pair of guillemets,
separated by commas:
« <label> [, <label>]* »
where:
<label> ::= <keyword> | <stereotype-label>
Keywords are context sensitive and, in a few cases, the same keyword is used for different purposes in different contexts.
For instance, the «create» keyword can appear next to an operation name to indicate that it as a constructor operation, and
it can also be used to label a Usage dependency between two Classes to indicate that one Class creates instances of the other.
This means that it is possible in principle to use a keyword for a user-defined stereotype (provided that it is used in a
context that does not conflict with the keyword context). However, such practices are discouraged since they are likely to
lead to confusion.
The keywords
currently defined as part of standard UML are specified in Table B.1, sorted in alphabetical
order. The following is the interpretation of the individual columns in this table:
• Keyword provides the exact spelling of the keyword (without the guillemets).
• Language Unit identifies the language unit in which the keyword is defined (and, implicitly, the chapter in which the keyword is described).
• Metamodel Element specifies the element of the UML metamodel (either a metaclass or a metaclass feature) that the keyword denotes.
• Semantics gives a brief description of the semantics of the keyword (see further explanations below); more detailed explanations are provided in the Notation sections of the corresponding metaclass description. The following formats are used:
1) If the entry contains the name of a UML metaclass, this indicates that the keyword is simply used toidentify the corresponding metaclass.
2) If the entry is a constraint (usually but not necessarily an OCL expression), it specifies a constraint that applies to
metamodel elements that are tagged with that keyword.
Issue 8459 - remove ‘1,’ since standard stereotypes start at L2
3)If the entry is in the form standard stereotype:L<x>, where <x> = 2, or 3, it means that the keyword represents a stereotype
that is defined at compliance level. In those cases, the more detailed description of the semantics can be found in Appendix
C, Standard Stereotype s.
• Notation Placement indicates where the keyword appears (see further explanations below). The following conventions are
used to specify the notation placement:
1) box header means that the keyword appears in the name compartment of a classifier rectangle.
2) list-box header means that the keyword is used as a header on a list box appearing as part of a classifier specification.
3) dashed-line label means that the keyword is used as a label on some dashed line, such as a Dependency .
4) inline label means that the keyword appears as part of a text line (usually at the front), such as an attribute definition.
5) between braces means that the keyword appears between curly brackets (similar to the constraint notation) and is used to
select the value of some property of a metaclass.
6) swimlane header means that the keyword appears as the header of a swimlane in an activity diagram.
Issue 8459 - change all references to level L1 to level L2
Keyword |
Language Unit |
Metamodel Element |
Semantics |
Notation Placement |
|
abstraction | Classes | Abstraction | Abstraction | box header | |
access | Classes | PackageImport | (visibility <> #public) | dashed-line label | |
activity | Activities | Activity | Activity | box header | |
actor | Use Cases | Actor | Actor | box header | |
after | CommonBehaviors | TimeEvent | isRelative = true | Inline label | |
all | CommonBehaviors | AnyReceiveEvent | Any event | Inline label | |
apply | Profiles | ProfileApplication | Package::appliedProfile-> collect(ap | ap.importedProfile) | dashed-line label | |
artifact | Deployments | Artifact | Artifact | box header | |
artifacts | Deployments | Component | list-box header | ||
at | CommonBehaviors | TimeEvent | isRelative = false | Inline label | |
attribute | Activities | ActivityPartition :: represents | ActivityPartition ::represents ->forAll(r | r.oclIsKindOf(Property)) | swimlane header | |
auxiliary | Classes | Classifier | standard stereotype:L2 | box header | |
Issue 8606 fix capitalization buildComponent | Components | Component | standard stereotype:L3 | box header | |
call | Classes | Usage | standard stereotype:L2 | dashed-line label | |
centralBuffer | Activities | CentralBufferNode | CentralBufferNode | box header | |
class | Activities | ActivityPartition :: represents | ActivityPartition ::represents ->forAll(r | r.oclIsKindOf(Class)) | swimlane header | |
component | Components | Component | Component | box header | |
create | Classes | Usage | standard stereotype:L2 | dashed-line label | |
create | Classes | BehavioralFeature | standard stereotype:L2 (constructor) | inline label on operation | |
create | CompositeStructures | Dependency | Applies only to dependencies between an InstanceSpec and Parameter of an operation, indicating a return parameter of an Operation that is a constructor. | dashed-line label | |
datastore | Activities | DataStoreNode | DataStoreNode | box header | |
datatype | Classes | DataType | DataType | box header |
Keyword |
Language Unit |
Metamodel Element |
Semantics |
Notation Placement |
|
delegate | Components | Connector | Connector::kind = #delegation | connector label | |
deploy | Deployments | Connector | delegation connector | dashed-line label | |
deployment spec | Deployments | Deployment Specification | DeploymentSpecification | box header | |
derive | Classes | Abstraction | standard stereotype:L2 | dashed-line label | |
destroy | Classes | BehavioralFeature | standard stereotype:L2 | inline label on operation | |
device | Deployments | Device | Device | box header | |
document | Deployments | Artifact | standard stereotype:L2 | box header | |
element access | Classes | ElementImport | not (visibility = #public) | dashed-line label | |
element import | Classes | ElementImport | visibility = #public | dashed-line label | |
entity | Components | Component | standard stereotype:L2 (business concept) | box header | |
enumeration | Classes | Enumeration | Enumeration | box header | |
executable | Deployments | Artifact | standard stereotype:L2 | box header | |
executionEnvironment | Deployments | ExecutionEnvironment | ExecutionEnvironment | box header | |
extend | Use Cases | Extend | Extend | dashed-line label | |
extended | State Machines | Region | Region ::extendedRegion ->notEmpty() | between braces | |
extended | State Machines | StateMachine | StateMachine::redefinedBehavior-> notEmpty() | between braces | |
external | Activities | ActivityPartition | ActivityPartition ::isExternal = true | swimlane header | |
file | Deployments | Artifact | standard stereotype:L2 | box header | |
focus | Classes | Class | standard stereotype:L2 | box header | |
framework | Classes | Package | standard stereotype:L2 | box header | |
from | CommonBehaviors | Trigger | to show port name | inline label | |
implement | Components | Component | standard stereotype:L2 | box header | |
implementationClass | Classes | Class | standard stereotype:L2 | box header | |
import | Classes | PackageImport | visibility = #public | dashed-line label | |
include | Use Cases | Include | Include | dashed-line label | |
information | Auxiliary::Information-Flows | InformationItem | InformationItem | box header | |
instantiate | Classes | Dependency | Dependency | dashed-line label |
Keyword |
Language Unit |
Metamodel Element |
Semantics |
Notation Placement |
|
instantiate | Classes | Usage | standard stereotype:L2 | dashed-line label | |
interface | Classes | Interface | Interface | box header | |
library | Deployments | Artifact | standard stereotype:L2 | box header | |
localPostcondition | Actions | Constraint | Action::localPostcondition | box header | |
localPrecondition | Actions | Constraint | Action::localPrecondition | box header | |
manifest | Deployments | Manifestation | Manifestation | dashed-line label | |
merge | Classes | PackageMerge | PackageMerge | dashed-line label | |
metaclass | Profiles | Classifier | metaclass being stereotyped | box header | |
metamodel | Auxiliary::Models | Model | standard stereotype:L3 | box header | |
model | Auxiliary::Models | Model | Model | box header | |
modelLibrary | Classes | Package | standard stereotype:L2 | box header | |
multicast | Activities | ObjectFlow | ObjectFlow ::isMulticast | flow label | |
multireceive | Activities | ObjectFlow | ObjectFlow ::isMultireceive | flow label | |
occurrence | CompositeStructures | Collaboration | (Behavior::context) from a Collaboration to the owning BehavioredClassifier, indicating that the collaboration represents the use of a classifier. | dashed-line label | |
postcondition | Activities | Constraint | Behavior::postcondition | box header | |
precondition | Activities | Constraint | Behavior::precondition | box header | |
primitive | Classes | PrimitiveType | PrimitiveType | box header | |
process | Components | Component | standard stereotype:L2 | box header | |
profile | Profiles | Profile | Profile | box header | |
provided interfaces | Components | Component | Component::provided | list-box header | |
realization | Classes | Classifier | standard stereotype:L2 | box header | |
realizations | Components | Component | Component::realizations->collect(r | r.realizingClassifier) | list-box header | |
Issue 8706 -add entry reference | Profiles | ElementImport | Profile::metaclassReference | dashed-line label | |
Issue 8706 -add entry reference | Profiles | PackageImport | Profile::metamodelReference | dashed-line label | |
refine | Classes | Abstraction | standard stereotype:L2 | dashed-line label |
Keyword |
Language Unit |
Metamodel Element |
Semantics |
Notation Placement |
|
representation | Auxiliary::Information-Flows | Classifier | InformationFlow::conveyed | dashed-line label | |
represents | CompositeStructures | Collaboration | (Behavior::context) from a Collaboration to the owning BehavioredClassifier; collaboration is USED in the classifier | dashed-line label | |
required interfaces | Components | Component | Component::required | list-box header | |
responsibility | Classes | Usage | standard stereotype:L2 | dashed-line label | |
script | Deployments | Artifact | standard stereotype:L2 | box header | |
selection | Activities | Behavior | ObjectFlow ::selection | box header | |
selection | Activities | Behavior | ObjectNode::selection | box header | |
send | Classes | Usage | standard stereotype:L2 | dashed-line label | |
service | Components | Component | standard stereotype:L2 | box header | |
signal | CommonBehaviors | Signal | Signal | box header | |
singleExecution | Activities | Activity | Activity::isSingleExecution = true | inside box | |
source | Deployments | Artifact | standard stereotype:L2 | box header | |
specification | Components | Classifier | standard stereotype:L2 | box header | |
statemachine | State Machines | BehavioredClassifier:: ownedBehavior | BehavioredClassifier::ownedBehavior. oclIsKindOf(StateMachine) | box header | |
stereotype | Profiles | Stereotype | Stereotype | box header | |
structured | Activities | StructuredActivity Node | StructuredActivityNode | box header | |
substitute | Classes | Substitution | Substitution | dashed-line label | |
subsystem | Components | Component | standard stereotype:L2 | box header | |
systemModel | Auxiliary::Models | Model | standard stereotype:L3 | box header | |
trace | Classes | Abstraction | standard stereotype:L2 | dashed-line label | |
transformation | Activities | Behavior | ObjectFlow ::transformation | box header | |
type | Classes | Class | standard stereotype:L2 | box header | |
use | Classes | Usage | Usage | dashed-line label | |
utility | Classes | Class | standard stereotype:L2 | box header | |
when | CommonBehaviors | ChangeEvent | ChangeEvent ::changeExpression | inline label |