During reverse engineering, the following code constructs in Visual Basic .NET correspond to UML elements.
Namespace
A Namespace in Visual Basic is reverse engineered as a UML package and includes:
-
Name
-
Members
Class
A class in Visual Basic is reverse engineered as a UML class and includes:
-
Name
-
Inherited classes and implemented interfaces
-
Visibility (public, protected, or private)
-
IsAbstract
-
IsLeaf
-
Member operations / functions (Member variables)
The following Visual Basic class constructs are not supported in Microsoft Office Visio UML:
-
Friend
-
Shadows
Interface
An interface in Visual Basic is reverse engineered as a UML interface and includes:
-
Name
-
Visibility (public, protected, or private)
-
IsLeaf
-
Base interfaces
-
Member operations
Enumerated type
An enumerated type in Visual Basic is reverse engineered as a UML data type with <<enum>> stereotype and includes:
-
Name
-
Visibility (public, protected, or private)
-
IsLeaf
-
Base classes
-
Members
Note: In Visual Basic, integral types are not reverse engineered.
Structure
A structure in Visual Basic is reverse engineered as a UML class with <<struct>> stereotype and includes:
-
Name
-
Visibility (public, protected, or private)
-
IsAbstract
-
IsLeaf
-
Base classes and implemented interfaces
-
Members
Properties
Properties in Visual Basic are reverse engineered as UML operations and include:
-
Name
-
Visibility (public, protected, or private)
-
Type
-
Getter and Setter
Note: In Visual Basic, the default property is not supported.
Delegates
Delegates in Visual Basic are reverse engineered as UML classes with the <<delegate>> stereotype and include:
-
Name
-
Visibility (public, protected, or private)
-
Signature (added to the class as an operation)
Member operations
Member operations in Visual Basic are added to the UML model as UML operations and include:
-
Name
-
Visibility (public, protected, or private)
-
Scope (static or shared)
-
IsPolymorphic
-
IsAbstract
-
Operation kind
Operations are flagged according to their type, such as constructor, destructor, operator, or procedure. You can view these flags in the UML model using the Code Generation Options page of the UML Operation Properties dialog box.
-
Return type
-
Parameters
-
mustOverride
Note: The following Visual Basic member operations are not supported in Microsoft Office Visio UML:
-
Not overridable—not directly supported, maps to UML element: operation::IsLeaf
-
Overloads—not supported
-
Handles—not supported
Events
Events in Visual Basic are added to the model as operations and include:
-
Visibility (public, protected, or private)
-
Parameters
Constants
Constants in Visual Basic are reverse engineered as UML attributes and include:
-
Visibility (public or private)
-
Type
-
Initial value
Constants are added to the model as attributes with the changeable field set to frozen.
For example, the Visual Basic line:
Const str As String = "some text"
will be given an initial value of:
"some text"
while
Const x As Integer = 1
will be given an initial value of 1.
Note: Read-only elements in code are reverse engineered as constants.
Member variables
Member variables in Visual Basic are added to the UML model as UML attributes and include:
-
Name
-
Type
-
Visibility (public, protected, or private)
-
Scope (static or shared)
-
Changeable (frozen or changeable)
-
Initial value
Method parameters
Method parameters in Visual Basic are added to the UML model as UML parameters and include:
-
Name
-
Type
-
Direction (in, inout, out, or return)
-
Default value
Note: The following Visual Basic parameter constructs are not supported in Microsoft Office Visio UML:
-
Optional
-
ParamArray
Visual Basic code constructs not supported in UML
The following Visual Basic code constructs won't be mapped to UML elements when reverse engineering from Visual Studio. NET to Microsoft Office Visio.
-
Classes: Friend, Protected Friend, Shadows.
-
Data members: Dim, New, WithEvents.
-
Enumerated type: integral types are not reverse engineered.
-
Member operations: Overloads, Handles, Not overridable (maps to UML element: operation::IsLeaf).
-
Parameter: optional, paramArray.
-
Property: default.