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 theProgress.Lang.Class
class that provide type information about a class or interface at run time.Return type: Any data type
Access: PUBLIC
Applies to: Progress.Lang.Class class
Four overloaded versions are supported. The first version is used to invoke a method that does not take any parameters.
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.
The third overloaded version is used when invoking a static method that does not take any parameters.
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.
Element descriptions for the syntax diagrams follow:
return-value
class-reference
object-reference
method-name
parameterlist-object
An instance of the Progress.Lang.ParameterList class.Notes: The Invoke( ) method allows for I/O blocking. The method to run must be VOID and the Invoke( ) method must be used as a stand-alone statement and not part of an expression.
The DYNAMIC-INVOKE function provides similar functionality to the Invoke( ) method. The advantage of the former is that it has a fixed, compile-time parameter list and does not require the creation of a Progress.Lang.ParameterList object at run time.See also: DYNAMIC-INVOKE function, DYNAMIC-NEW statement, New( ) method, NumParameters property, Progress.Lang.ParameterList class, SetParameter( ) method (Class)
OpenEdge Release 10.2B
|