PreviousNextIndex

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: 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.

Syntax
[ return-value = ] class-reference:Invoke( object-reference, method-name ). 

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 
  ( object-reference, method-name, parameterlist-object ). 

The third overloaded version is used when invoking a static method that does not take any parameters.

Syntax
[ return-value = ] class-reference:Invoke( method-name ). 

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 
  ( method-name, parameterlist-object ). 

Element descriptions for the syntax diagrams follow:

return-value
class-reference
object-reference
method-name
parameterlist-object

See also: DYNAMIC-INVOKE function, DYNAMIC-NEW statement, New( ) method, NumParameters property, Progress.Lang.ParameterList class, SetParameter( ) method (Class)


OpenEdge Release 10.2B
Copyright © 2009 Progress Software Corporation
PreviousNextIndex