MethodInfo Class [AX 2012]
Provides information about a specified method.
| Method | Description | |
|---|---|---|
| accessSpecifier | Specifies whether the method is public, protected, or private. |
| cancelTimeOut | Cancels a previous method call to the setTimeOut method. (Inherited from Object.) |
| compiledOk | Specifies whether the method has compiled. |
| displayTableId | |
| displayType | Specifies the display function type of a method. |
| equal | Determines whether the specified object is equal to the current one. (Inherited from Object.) |
| getAllAttributes | Gets the full set of attributes for the method. |
| getAttribute | Gets the first matching attribute from the class header metadata, creates an instance of the Object class that represents it, and returns it. |
| getAttributes | |
| getTimeOutTimerHandle | Returns the timer handle for the object. (Inherited from Object.) |
| handle | Retrieves the handle of the class of the object. (Inherited from Object.) |
| isAbstract | Indicates whether the method is abstract. |
| isStatic | Specifies whether the method is static. |
| name | Specifies the name of a method. |
| new | Creates a new instance of the MethodInfo class. (Overrides the new Method.) |
| noParms | Specifies the number of parameters in a method. |
| notify | Releases the hold on an object that has called the wait method on this object. (Inherited from Object.) |
| notifyAll | Releases a lock on the object that was issued by the wait method on this object. (Inherited from Object.) |
| noVars | Specifies the number of variables in a method. |
| objectOnServer | Determines whether the object is on a server. (Inherited from Object.) |
| owner | Returns the instance that owns the object. (Inherited from Object.) |
| parentId | Specifies the table ID for a table method or the class ID for a class method. |
| propertyHelp | Specifies the Help text that a method sets or returns for a control. |
| PropertyMethod | Specifies whether a method is a property method. |
| returnId | Specifies the ID for certain return data types, such as extended data types and classes, for a method that returns a value. |
| returnType | Specifies a method return type. |
| runMode | Specifies where a method is executed. |
| setMethod | Specifies the application object type of a node in the Application Object Tree (AOT) by using an instance of the . |
| setTimeOut | Sets up the scheduled execution of a specified method. (Inherited from Object.) |
| toString | Returns a string that represents the current object. (Inherited from Object.) |
| usageCount | Returns the current number of references, that is, the value of the reference counter, that the object has. (Inherited from Object.) |
| varId | Specifies the ID for certain variable data types, such as extended data types and enums, for a method that contains variables. |
| varIdOld | |
| varType | Specifies a variable data type by using values from the Types enumeration. |
| wait | Pauses a process. (Inherited from Object.) |
| xml | Returns an XML string that represents the current object. (Inherited from Object.) |
The following example uses the SysDictClass::ObjectMethodObject method to assign a method of a FormBuildDataSource Class object to an instance of the MethodInfo class. An integer value specifies the method.
The MethodInfo.name Method method returns the method name.
void getMethodInfo()
{
MethodInfo methodInfo;
SysDictClass sysDictClass;
str name;
try
{
sysDictClass = new SysDictClass(classnum(FormBuildDataSource));
methodInfo = sysDictClass.objectMethodObject(1);
if(!methodInfo)
{
throw exception::Error;
}
name = methodInfo.name();
print name;
pause;
}
catch (exception::Error)
{
print "The specified method does not exist";
pause;
}
}
Community Additions
ADD
Show: