Previous Next

Invoke( ) method (Class)
Dynamically invokes a method whose name and parameters must be set at run time. The Invoke( ) method is one of several reflection methods of the Progress.Lang.Class class that provide type information about a class or interface at run time.
Return type:
Access:
Applies to:
Four overloaded versions are supported. The first version is used to invoke a method that does not take any parameters.
 
Syntax 
[ return-value = ] class-reference:Invoke ( 
  INPUT object-reference AS Progress.Lang.Object ,
  INPUT method-name AS CHARACTER )
The second overloaded version is used to invoke a method that takes zero or more parameters. Since parameterlist-object can be built with zero or more parameters, this version of the Invoke( ) method can be used to invoke any method, even those that do not take any arguments.
 
Syntax 
[ return-value = ] class-reference:Invoke ( 
  INPUT object-reference AS Progress.Lang.Object ,
  INPUT method-name AS CHARACTER ,
  INPUT parameterlist-object AS Progress.Lang.ParameterList )
The third overloaded version is used when invoking a static method that does not take any parameters.
 
Syntax 
[ return-value = ] class-reference:Invoke ( INPUT method-name AS CHARACTER )
The fourth overloaded version is used when invoking a static method that takes zero or more parameters. Since parameterlist-object can be built with zero or more parameters, this version of the Invoke( ) method can be used to invoke any static method, even those that do not take any arguments.
 
Syntax 
[ return-value = ] class-reference:Invoke ( 
  INPUT method-name AS CHARACTER ,
  INPUT parameterlist-object AS Progress.Lang.ParameterList )
Element descriptions for the syntax diagrams follow:
return-value
An optional data element which is assigned the return value from the invoked, non-void method. This return value can have any valid ABL or .NET method return type. The AVM checks return-value at run time for data type compatibility with what is actually returned by the method.
class-reference
An object reference to the Progress.Lang.Class class instance containing the type information.
object-reference
A reference to the object that contains the method you want to invoke, and whose type is compatible with the class-reference object. When invoking a static method, the Unknown value (?) is passed for this parameter.
method-name
A CHARACTER expression that evaluates at run time to the name of the method to be invoked.
parameterlist-object
An instance of the Progress.Lang.ParameterList class.
Notes:
See also:

Previous Next
© 2013 Progress Software Corporation and/or its subsidiaries or affiliates.