TCodeMemberMethod Class
Represents a method (procedure or function) declaration within a type.
Syntax
Unit: Bcl.Code.MetaClasses
TCodeMemberMethod = class(TCodeTypeMember);
Methods
| Name | Description |
|---|---|
| AddSnippet | Adds a raw code snippet statement to the method body. |
| AddSnippetFmt | Adds a formatted raw code snippet statement to the method body. |
| AddParameter | Adds a parameter to this method. |
| RemoveParameter | Removes a parameter by name from this method. |
| IndexOfParameter | Returns the index of a parameter by name. |
| FindParameter | Searches for a parameter by name. |
| DeclareVar | Declares a local variable in the method body. |
| IndexOfVar | Returns the index of a local variable by name. |
| DefineReturnType | Sets the return type for this method, making it a function. |
Properties
| Name | Description |
|---|---|
| Parameters | Gets the list of parameter declarations for this method. |
| ReturnType | Gets or sets the return type reference for this method. |
| Directives | Gets or sets the method directives. |
| Statements | Gets the list of statements in the method body. |
| Vars | Gets the list of local variable declarations for this method. |
| IsStatic | Indicates whether this is a class (static) method. |
| IsOperator | Indicates whether this method is an operator overload. |