Attribute is a named slot within a class (or other
Classifier) describing a range of values that may
be held by instances of the class. In the UML metamodel it is a
StructuralFeature which is itself a
An attribute is represented in the diagram on a single line within the attribute compartment of the class. Its syntax is as follows:
package visibility respectively.
attributeName is the actual name of the attribute being declared.
type is the type (UML datatype, class or interface) declared for the attribute.
initialValue is any initial value to be given to the attribute when an instance of the class is created. This may be overridden by any constructor operation.
In addition any attribute declared static will have its whole entry underlined on the diagram.
The details tabs that are active for attributes are as follows.
Standard tab. See Section 13.4, “Documentation Tab”.
Standard tab. This contains a declaration for the attribute.
Standard tab. There are no standard constraints defined
Attribute within the UML
Standard tab. In the UML metamodel,
Attribute has the following standard tagged values
volatile. This is an ArgoUML
extension to the UML 1.4 standard to indicate that this
attribute is realized in some volatile form (for example
it will be a memory mapped control register).
Standard tab for a Attribute.
Navigate up through the package structure.
This creates a new attribute within the owning class of the current attribute, navigating immediately to the properties tab for that attribute.
This is a very convenient way to add a number of attributes, one after the other, to a class.
This creates a new Datatype (see Section 16.3, “Datatype”) for the selected attribute, navigating immediately to the properties tab for that datatype.
This creates a new Stereotype (see Section 16.5, “Stereotype”) for the selected attribute, navigating immediately to the properties tab for that stereotype.
This deletes the attribute from the model
This is a deletion from the model not just the diagram. If desired the whole attribute compartment can be hidden on the diagram using the style tab (see Section 18.6.2, “Attribute Property Toolbar”) or the button 2 pop up menu for the class on the diagram.
Text box. The name of the attribute. The name of a attribute has a leading lower case letter, with words separated by “bumpy caps”.
The ArgoUML critics will complain about attribute names that do not have an initial lower case letter.
Drop down selector. There are no UML standard
icon. If a stereotype has been selected, this will navigate to the stereotype property panel (see Section 16.5, “Stereotype”).
Text box. Records the class which contains this attribute.
Button 1 double click on the entry will navigate to the class.
Editable drop down selector. The default value (1) is that there is one instance of this attribute for each instance of the class, i.e. it is a scalar. The drop down provides a number of commonly used specifications for non-scalar attributes.
ArgoUML presents a number of predefined ranges for multiplicity for easy access. The user may also enter any user defined range that follows the UML syntax, such as “1..3,7,10”.
Drop down selector. The type of this attribute. This can
be any UML
Classifier, although in practice
Interface make any sense.
A type must be declared (it can be
Text box with drop down. This allows you to set an
initial value for the attribute if desired (this is optional).
The drop down menu provides access to the common values
Any constructor operation may ignore this initial value.
Radio box, with entries
public. The attribute is
available to any artifact that can see the owning
private. The attribute is
available only to the owning class (and any inner
protected. The attribute is
available only to the owning class, or artifacts that are
subclasses of the owning class.
package. The attribute is
available only to artifacts contained in the same
Radio box, with entries
addOnly. Meaningful only if the
multiplicity is not fixed to a single value. Additional
values may be added to the set of values, but once created
a value may not be removed or altered.
changeable. There are no
restrictions of modification.
frozen. Also named
“immutable”. The value of the attribute may
not change during the lifetime of the owner class. The
value must be set at object creation, and may never change
after that. This implies that there is usually an argument
for this value in a constructor and that there is no
operation that updates this value.
Check box for
static. If unchecked
(the defaults) then the attribute has “instance
scope”. If checked, then the attribute is static, i.e.
it has “class scope”. Static attributes are
indicated on the diagram by underlining.