DictClass.callStatic Method

Calls a static method.


public anytype callStatic(str methodName,  )

Run On



  • methodName
    Type: str
    A string data type that indicates the name of the method to call.
  • Type: [T:]

Return Value

Type: anytype
An anytype data type value that is returned by the specified method.


You must create an instance of an object of the DictClass class by using a class that contains the method passed to the callStatic method. If an attacker can control the input to the callStatic method, a security risk exists. Therefore, this method runs under the code access security. Calls to this method on the server require permission from the ExecutePermission class. Make sure that the user has development rights by setting the security key to the SysDevelopment on the control that calls this method.


This example calls the AOSClientMode method in the Session class and then prints the value returned from the call.

static void Job_Example_DictClass_CallStatic(Args _args) 
    DictClass dictClass; 
    anytype   retVal; 
    str       resultOutput; 
    ExecutePermission perm; 
    perm = new ExecutePermission(); 
    // Grants permission to execute the DictClass.callStatic method. 
    // DictClass.callStatic runs under code access security. 
    dictClass = new DictClass(classnum(Session)); 
    if (dictClass != null) 
        retVal       = dictClass.callStatic("AOSClientMode"); 
        resultOutput = strfmt( 
            "Return value of AOSClientMode is %1",  
        print resultOutput; 
    // Closes the code access permission scope. 

See Also

DictClass Class