CALL METHOD - dynamic_meth

Syntax

... (meth_name)
  | cref->(meth_name)
  | iref->(meth_name)
  | (class_name)=>(meth_name)
  | class=>(meth_name)
  | (class_name)=>meth ... .

Alternatives:

1. ... (meth_name) ... .

2. ... cref->(meth_name) ... .

3. ... iref->(meth_name) ... .

4. ... (class_name)=>(meth_name) ... .

5. ... class=>(meth_name) ... .

6. ... (class_name)=>meth ... .

Effect

: These names are used to dynamically specify methods. For meth_name and class_name, character-type fields are expected, which must contain the name of a method or a class in upper case during the execution of the statement.

Alternative 1

... (meth_name) ... .


Effect

: This form is only possible for methods of the same class

Alternative 2

... cref->(meth_name) ... .


Effect

: This form is possible for all visible methods of objects. cref can be any class reference variable that points to an object that contains the method specified in meth_name.

Alternative 3

... iref->(meth_name) ... .


Effect

: This form is possible for all visible interface methods of objects. iref can be any interface reference variable that points to an object that contains the interface method specified in meth_name.

Note

In contrast to access using class reference variables, interface reference variables can only be used to access interface components, and not to access all components, even with dynamic access.

Alternative 4

... (class_name)=>(meth_name) ... .


Alternative 5

... class=>(meth_name) ... .


Alternative 6

... (class_name)=>meth ... .


Effect

: These forms are possible for all visible static methods. Both the class and method can be dynamically specified. The class class and the method meth can also be specified directly.