Réserver une Démo

SVP notez : Cette page d’aide n’est pas pour la dernière version d’Enterprise Architect. La dernière aide peut être trouvée ici.

Pré. Proc.

Method Class

A method represents a UML operation. It is accessed from the Element Methods collection and includes collections for parameters, constraints and Tagged Values.

Associated table in repository

t_operation

Method Attributes

Attribute

Remarks

See also

Abstract

Boolean
Notes: Read/Write
A flag indicating if the method is abstract (1) or not (0).

Behavior

String
Notes: Read/Write
Some further explanatory behavior notes (for example, pseudocode).
In earlier releases of Enterprise Architect this attribute had the UK/Australian spelling 'Behaviour'; this is still present for backwards compatibility, but please now use the 'Behavior' attribute for consistency.

ClassifierID

String
Notes: Read/Write
The Classifier ID that applies to the ReturnType.

Code

String
Notes: Read/Write
An optional field to hold the method code (used for the 'Initial Code' field).

Concurrency

Variant
Notes: Read/Write
Indicates the concurrency type of the method.

FQStereotype

String
Notes: Read Only
The fully-qualified stereotype name in the format "Profile::Stereotype". One or more fully-qualified stereotype names can be assigned to StereotypeEx.

IsConst

Boolean
Notes: Read/Write
A flag indicating that the method is Const.

IsLeaf

Boolean
Notes: Read/Write
A flag to indicate if the method is a Leaf (cannot be overridden).

IsPure

Boolean
Notes: Read/Write
A flag indicating that the method is defined as 'Pure' in C++.

IsQuery

Boolean
Notes: Read/Write
A flag to indicate if the method is a query (that is, does not alter Class variables).

IsRoot

Boolean
Notes: Read/Write
A flag to indicate if the method is Root.

IsStatic

Boolean
Notes: Read/Write
A flag to indicate a static method.

IsSynchronized

Boolean
Notes: Read/Write
A flag indicating a Synchronized method call.

MethodGUID

String
Notes: Read/Write
A globally unique ID for the current method. This is system generated.

MethodID

Long
Notes: Read only
A local ID for the current method, only valid within this .eap file.

Name

String
Notes: Read/Write
The method name.

Notes

String
Notes: Read/Write
Descriptive notes on the method.

ObjectType

ObjectType
Notes: Read only
Distinguishes objects referenced through a Dispatch interface.
ObjectType

Parameters

Collection Class
Notes: Read only
The Parameters collection for the current method, used to add and access parameter objects for the current method.

ParentID

Long
Notes: Read only
Returns the ElementID of the element that this method belongs to.

Pos

Long
Notes: Read/Write
Specifies the position of the method within the set of operations defined for a Class.

PostConditions

Collection Class
Notes: Read only
The PostConditions (constraints) as they apply to this method. This returns a MethodConstraint object of type 'post'.

PreConditions

Collection Class
Notes: Read only
The PreConditions (constraints) as they apply to this method. This returns a MethodConstraint object of type 'pre'.

ReturnIsArray

Boolean
Notes: Read/Write
A flag to indicate that the return value is an array.

ReturnType

String
Notes: Read/Write
The return type for the method; this can be a primitive data type or a Class or Interface type.

StateFlags

String
Notes: Read/Write
Some flags as applied to methods in State elements.

Stereotype

String
Notes: Read/Write
The method stereotype (optional).
When setting this attribute, LastError (for the GetLastError method) will be non-empty if an error occurs.

StereotypeEx

String
Notes: Read/Write
All the applied stereotypes of the method in a comma-separated list. Reading the value will provide the stereotype name only; assigning the value accepts either fully-qualified or simple names.
When setting this attribute, LastError (for the GetLastError method) will be non-empty if an error occurs.

Style

String
Notes: Read/Write
Contains the Alias property for this method.

StyleEx

String
Notes: Read/Write
Advanced style settings, reserved for the use of Sparx Systems.

TaggedValues

Collection Class of type MethodTag Class
Notes: Read only
The TaggedValues collection for the current method. This accesses a list of MethodTag objects.

Throws

String
Notes: Read/Write
Exception information. Valid input for setting the Throws is:

  • GUID String - the GUID of an element in the model or a comma-separated list of element GUIDS

  • <none> - removes the existing Throws set

TypeInfoProperties

Notes: Read only
Returns an interface pointer of TypeInfoProperties.
TypeInfoProperties Class

Visibility

String
Notes: Read/Write
The method scope - Public, Protected, Private or Package.

Method Methods

Method

Remarks

See also

GetLastError()

String
Notes: Returns a string value describing the most recent error that occurred in relation to this object.

GetTXAlias (string Code, long Flag)

String
Notes: Returns the Alias of the element for a given language.
Parameters

  • Code: String - Two-letter language code (found on the 'Translations' page of the 'Manage Model Options' dialog)

  • Flag: Long
         -  0 = Get the currently-stored translated Alias
         -  1 = Get the currently-stored translated Alias, and auto translate if the original Alias has changed
         -  2 = Always fetch the translated Alias from online

Translate Page

GetTXName (string Code, long Flag)

String
Notes: Returns the name of the element for a given language.
Parameters

  • Code: String - Two-letter language code (found on the 'Translations' page of the 'Manage Model Options' dialog)

  • Flag: Long
         -  0 = Get the currently-stored translated name
         -  1 = Get the currently-stored translated name, and auto translate if the original name has changed
         -  2 = Always fetch the translated name from online

Translate Page

GetTXNote (string Code, long Flag)

String
Returns the Notes of the element for a given language.
Parameters

  • Code: String - Two-letter language code (found on the 'Translations' page of the 'Manage Model Options' dialog)



  • Flag: Long
        -  0 = Get the currently-stored translated Notes
        -  1 = Get the currently-stored translated Notes, and auto translate if the original Notes have changed
        -  2 = Always fetch the translated Notes from online

Translate Page

SetTXName (string Code, string Translation)

String
Notes - Set the translated name of the element for a given language.

  • Code: String - Two-letter language code (found on the 'Translations' page of the 'Manage Model Options' dialog)

  • Translation: String - The translated name

Translate Page

SetTXAlias (string Code, string Translation)

String
Notes - Set the translated Alias of the element for a given language.

  • Code: String - Two-letter language code (found on the 'Translations' page of the 'Manage Model Options' dialog)

  • Translation: String - The translated Alias

Translate Page

SetTXNote (string Code, string Translation)

String
Notes - Set the translated Notes of the element for a given language.

  • Code: String - Two-letter language code (found on the 'Translations' page of the 'Manage Model Options' dialog)

  • Translation: String - The translated Notes

Translate Page

Update()

Boolean
Notes: Update the current method object after modification or appending a new item.
If False is returned, check the 'GetLastError()' function for more information.