public 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 |
Parameters |
Collection |
Read only. The Parameters collection for the current method. Use to add and access parameter objects for the current method. |
PreConditions |
Collection |
Read only. PreConditions (constraints) as they apply to this method. Returns a MethodConstraint object of type pre. |
PostConditions |
Collection |
Read only. PostConditions (constraints) as they apply to this method. Returns a MethodConstraint object of type post. |
MethodGUID |
String |
Read/Write. A globally unique ID for the current method. System generated. |
TaggedValues |
Collection |
Read only. TaggedValues collection for the current method. Accesses a list of MethodTag objects. |
MethodID |
Long |
Read only. A local ID for the current method, only valid within this .EAP file. |
Name |
String |
Read/Write. The method name. |
Visibility |
String |
Read/Write. The method scope: Public, Protected, Private or Package. |
ReturnType |
String |
Read/Write. Return type for the method; can be a primitive data type or a class or interface type. |
ReturnIsArray |
Boolean |
Read/Write. Flag to indicate the return value is an array. |
Stereotype |
String |
Read/Write. The method stereotype (optional). |
StereotypeEx |
String |
Read/Write. All the applied stereotypes of the method in a comma-separated list. |
IsStatic |
Boolean |
Read/Write. Flag to indicate a static method. |
Concurrency |
Variant |
Read/Write. Concurrency type of method. |
Notes |
String |
Read/Write. Descriptive notes about the method. |
Behavior |
String |
Read/Write. Some further explanatory behavior notes (eg. pseudocode). Note: 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. |
Abstract |
Boolean |
Read/Write. Flag indicating if the method is abstract (1) or not (0). |
IsSynchronized |
Boolean |
Read/Write. Flag indicating a Synchronized method call. |
IsConst |
Boolean |
Read/Write. Flag indicating the method is Const. |
Style |
String |
Read/Write. Extended style information about the method. |
IsPure |
Boolean |
Read/Write. Flag indicating the method is defined as Pure in |
Throws |
String |
Read/Write. Exception information. |
ClassifierID |
String |
Read/Write. Classifier ID that applies to the ReturnType. |
StyleEx |
String |
Read/Write. Advanced style settings. Not currently used. |
Code |
String |
Read/Write. Optional field to hold the method Code (used for the Initial Code field). |
IsRoot |
Boolean |
Read/Write. Flag to indicate if the method is Root. |
IsLeaf |
Boolean |
Read/Write. Flag to indicate if the method is Leaf (cannot be overridden). |
IsQuery |
Boolean |
Read/Write. Flag to indicate if the method is a query (ie. does not alter class variables). |
StateFlags |
String |
Read/Write. Some flags as applied to methods in State elements. |
Pos |
Long |
Read/Write. Specifies the position of the method within the set of operations defined for a class. |
ParentID |
Long |
Read only. An optional ID of an element that 'owns' this diagram; eg. a Sequence diagram owned by a Use Case. |
ObjectType |
Read only. Distinguishes objects referenced through a Dispatch interface. |
Method Methods
Method |
Type |
Notes |
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. |
GetLastError () |
String |
Returns a string value describing the most recent error that occurred in relation to this object. This function is rarely used since an exception is thrown when an error occurs. |