Class Properties

You can modify an object's properties from its property sheet. To open a class property sheet, double-click its diagram symbol or its Browser entry in the Classes folder. The following sections detail the property sheet tabs that contain the properties most commonly entered for classes.

The General tab contains the following properties:

Property

Description

Name

Specifies the name of the item, which should be clear and meaningful, and should convey the item's purpose to non-technical users.

Code

Specifies the technical name of the object, which is used for generating code or scripts.

Comment

Descriptive comment for the object.

Extends

Specifies the parent class (to which the present class is linked by a generalization). Click the Select Classifier tool to the right to specify a parent class and click the Properties tool to access its property sheet.

Stereotype

Extends the semantics of the object beyond the core UML definition. The following common stereotypes are available by default:


  • <<actor>> - Coherent set of roles that users play

  • <<enumeration>> - List of named values used as the range of an attribute type

  • <<exception>> - Exception class, mainly used in relation to error messages

  • <<implementationClass>> - Class whose instances are statically typed. Defines the physical data structure and methods of a class as implemented in traditional programming languages

  • <<process>> - Heavyweight flow that executes concurrently with other processes

  • <<signal>> - Specification of asynchronous stimulus between instances

  • <<metaclass>> - a metaclass of some other class

  • <<powertype>> - a metaclass whose instances are sub-classes of another class

  • <<thread>> - Lightweight flow that executes concurrently with other threads within the same process. Usually executes inside the address space of an enclosing process

  • <<type>> - Abstract class used to specify the structure and behavior of a set of objects but not the implementation

  • <<utility>> - Class that has no instances

Other language-specific stereotypes may be available. These stereotypes are defined in the object language file. For more information, see "Stereotypes (Profile)" in the Extending your Models with Profiles chapter of the Customizing and Extending PowerDesigner manual.

Visibility

Specifies the visibility of the object, how it is seen outside its enclosing namespace. When a class is visible to another object, it may influence the structure or behavior of the object, and/or be affected by it. You can choose between:


  • Private – only to the object itself

  • Protected – only to the object and its inherited objects

  • Package – to all objects contained within the same package

  • Public – to all objects (option by default)

Cardinality

Specifies the number of instances a class can have. You can choose between:


  • 0..1 – None to one

  • 0..* – None to an unlimited number

  • 1..1 – One to one

  • 1..* – One to an unlimited number

  • * – Unlimited number

Type

Allows you to specify that a class is a generic type, or that it is bound to one. You can choose between:


  • Class

  • Generic

  • Bound – If you select this option, then an additional list becomes available to the right, where you can specify the generic type to which the class is bound. You can use the tools to the right of the list to create an object, browse the complete tree of available objects or view the properties of the currently selected object.

If you specify either Generic or Bound, then the Generic tab is displayed, allowing you to control the associated type variables (see Class property sheet Generic tab). For more information on generic types and binding classes to them, see Generic types and methods.

Abstract

Specifies that the class cannot be instantiated and therefore has no direct instances.

Final

Specifies that the class cannot have any inherited objects.

Generate code

Specifies that the class is included when you generate code from the model, it does not affect inter-model generation.

The following tabs list objects associated with the class:


  • Attributes - lists the attributes associated with the class. Click the Inherited button to review the public and protected attributes inherited from a parent class. You can create attributes, including accessors, directly in this tab, or add already existing attributes. For more information, see Attributes (OOM).

  • Identifiers - lists the identifiers associated with the class. You can create identifiers directly in this tab. For more information, see Identifiers (OOM).

  • Operations - lists the operations associated with the class. You can create operations directly in this tab, or add already existing operations. For more information, see Operations (OOM).

  • Ports - lists the ports associated with the class. You can create ports directly in this tab. For more information, see Ports (OOM).

  • Parts - lists the parts associated with the class. You can create parts directly in this tab. For more information, see Parts (OOM).

  • Associations - lists the associations associated with the class. For more information, see Associations (OOM).

  • Inner Classifiers - lists the inner classes and interfaces associated with the class. You can create inner classifiers directly in this tab. For more information, see Composite and inner classifiers.

  • Related Diagrams - lists the model diagrams that are related to the class. You can add diagrams in this tab. For more information see "Defining related diagrams" in the Diagrams and Symbols chapter of the Core Features Guide.

For more information on how to manipulate categories and entries in the object language, see the Resource Files and the Public Metamodel chapter of the Customizing and Extending PowerDesigner manual.

For more information on extended model definitions, see "Extended model definitions" in the Models chapter of the Core Features Guide.


Created October 7, 2009. Send feedback on this help topic to Sybase Technical Publications: pubs@sybase.com