Prev Next

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

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.

Parameters

Collection

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

Notes: Read only

The PostConditions (constraints) as they apply to this method. This returns a MethodConstraint object of type 'post'.

PreConditions

Collection

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).

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.

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 of type MethodTag

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

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.

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.