Please note : This help page is not for the latest version of Enterprise Architect. The latest help can be found here.
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 .EAP file: t_operation
Method Attributes:
Attribute |
Type |
Notes |
---|---|---|
Abstract |
Boolean |
Read/Write A flag indicating if the method is abstract (1) or not (0).
|
Behavior |
String |
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 |
Read/Write The Classifier ID that applies to the ReturnType.
|
Code |
String |
Read/Write An optional field to hold the method code (used for the Initial Code field).
|
Concurrency |
Variant |
Read/Write Indicates the concurrency type of the method.
|
IsConst |
Boolean |
Read/Write A flag indicating that the method is Const.
|
IsLeaf |
Boolean |
Read/Write A flag to indicate if the method is Leaf (cannot be overridden).
|
IsPure |
Boolean |
Read/Write A flag indicating that the method is defined as Pure in C++.
|
IsQuery |
Boolean |
Read/Write A flag to indicate if the method is a query (that is, does not alter Class variables).
|
IsRoot |
Boolean |
Read/Write A flag to indicate if the method is Root.
|
IsStatic |
Boolean |
Read/Write A flag to indicate a static method.
|
IsSynchronized |
Boolean |
Read/Write A flag indicating a Synchronized method call.
|
MethodGUID |
String |
Read/Write A globally unique ID for the current method. This is system generated.
|
MethodID |
Long |
Read only A local ID for the current method, only valid within this .EAP file.
|
Name |
String |
Read/Write The method name.
|
Notes |
String |
Read/Write Descriptive notes on the method.
|
ObjectType |
Read only Distinguishes objects referenced through a Dispatch interface.
|
|
Parameters |
Read only The Parameters collection for the current method, used to add and access parameter objects for the current method.
|
|
ParentID |
Long |
Read only Returns the ElementID of the element that this method belongs to.
|
Pos |
Long |
Read/Write Specifies the position of the method within the set of operations defined for a Class.
|
PostConditions |
Read only The PostConditions (constraints) as they apply to this method. This returns a MethodConstraint object of type post.
|
|
PreConditions |
Read only The PreConditions (constraints) as they apply to this method. This returns a MethodConstraint object of type pre.
|
|
ReturnIsArray |
Boolean |
Read/Write A flag to indicate that the return value is an array.
|
ReturnType |
String |
Read/Write The return type for the method; this can be a primitive data type or a Class or Interface type.
|
StateFlags |
String |
Read/Write Some flags as applied to methods in State elements.
|
Stereotype |
String |
Read/Write The method stereotype (optional).
|
StereotypeEx |
String |
Read/Write All the applied stereotypes of the method in a comma-separated list.
|
Style |
String |
Read/Write Contains the Alias property for this method.
|
StyleEx |
String |
Read/Write Advanced style settings, reserved for the use of Sparx Systems.
|
TaggedValues |
Collection of type MethodTag
|
Read only The TaggedValues collection for the current method. This accesses a list of MethodTag objects. |
Throws |
String |
Read/Write Exception information.
|
Visibility |
String |
Read/Write The method scope - Public, Protected, Private or Package.
|
Method Methods:
Method |
Type |
Notes |
---|---|---|
GetLastError () |
String |
Returns a string value describing the most recent error that occurred in relation to this object.
|
Update () |
Boolean |
Update the current method object after modification or appending a new item. If false is returned, check the GetLastError function for more information.
|