Poseidon VB.Net Code Generation Plug-in Guide

» PDF PDF Version =>

General Rules

  • 'package' visibility will be translated into 'Friend'
  • 'abstract' will be translated into 'MustInherit' or 'MustOverride'
  • 'final' will be translated into 'NotInheritable' or 'NotOverridable'
  • 'static' will be translated into 'Shared'

The following keys for tagged value pairs are supported when the value has been set to 'true' within the appropriate context:

  • 'Shadows'
  • 'Overridable'
  • 'Protected Friend'

Modelling Element Rules

Classes

  • Uses the standard UML 'Class'
  • Supports single inheritance only
  • Protected Friend visibility is determined by setting the tagged value 'Protected Friend' to 'true'. Everything else will use the checked visibility radio button.
  • Classes with abstract operations must also be declared 'abstract'

Interfaces

  • Uses the standard UML 'Interface'
  • Interface identifiers must start with the 'I' character
  • Interface operations must be 'Public' and cannot be 'Shared'
  • Interfaces cannot have attributes or navigable opposite association ends

Modules

  • Uses the standard UML 'Class' with the << Module>> stereotype
  • Modules cannot be 'abstract' or 'final'
  • Modules cannot participate in generalizations or specifications
  • Modules cannot be an inner classifier or have an inner classifier
  • Modules cannot have a 'Protected' or 'Protected Friend' member

Structures

  • Uses the standard UML 'Class' with the << Structure>> stereotype
  • Structures must have at least one member that is non-static (shared) and is either an attribute, a navigable opposite association end, or an operation with the stereotype <<Event>>.
  • Structures cannot have a 'Protected' or 'Protected Friend' member
  • Structures cannot have an attribute or navigable opposite association end with an initialized value

Enums

  • Uses the standard UML 'Class' with the << Enum>> stereotype
  • By default it generates an Enum as type 'Integer'
  • Enums do not participate in generalizations or specifications
  • Enums cannot have navigable opposite association ends, operations, or inner classifiers
  • Other Enum types are supported by using the tagged value key 'type' with one of the following values
    • 'Short'
    • 'Byte'
    • 'Integer'
    • 'Long'
    Anything else will default to 'Integer'.

Operations

  • Operations support the following tagged values:
    • 'Protected Friend'
    • 'Shadows'
    • 'Overridable'
  • Operations with no return parameter (returning 'void') are generated as 'Sub'
  • Operations with a return parameter are generated as 'Function'

Operation's Parameters

  • Parameter type 'in' is translated as 'ByVal', everything else is 'ByRef'
  • The type 'ParamArray' is supported by using the stereotype << ParamArray>> with a parameter
  • A 'ParamArray' parameter must be the last parameter
  • A 'ParamArray' parameter must be of type 'in' or 'ByVal'

Attribute & Association Ends

  • Supports the tagged value 'Protected Friend'

Visual Basic Properties

  • Properties are supported with <<Property>> stereotyped operations
  • There are 3 type of stereotypes available:
    • ‘Property’ will generate ‘Get’ and ‘Set’ inside the Property block
    • ‘ReadOnly Property’ will generate only ‘Get’ inside the Property block
    • ‘WriteOnly Property’ will generate only ‘Set’ inside the Property block
  • If no attribute is set in ‘accessed attribute’, it will by default generate an attribute with same type as the Property return type with the name set to ‘m_operation_name’.

Visual Basic Events

  • VB Events are supported by using <<Event>> stereotypes with operations


© 2000 - 2010 Gentleware AG
         
                        
 support  documentation  vb.net