3.1 APL Related Functions

This section describes the function that will facilitate the use of a user defined APL function in the APL Configuration File by using the APL Code Editor.

For information about APL in , see APL Reference Guide

invokeAPL

This function will invoke any user defined APL function in the APL Configuration File. APL functions declared in the Analysis Agent may not be invoked by this command.

Object invokeAPL (String profile, String func, Object... args) throws Exception;
ParameterDescription

profile

The name of the APL Configuration file.

func

The name of the function to be executed.

argsA list of arguments required by the function.
ReturnsThe result of the executed function.

Example - invokeAPL

The following example shows invokeAPL calling an APL function where the function will increment any integer by 1.

Where the APL code will be:

int increment (int a) {
    return   a + 1;
}


The Java code will be:

int result = (int) env.invokeAPL("Default.APL_Common_Func","increment", 5);
env.debug("increment = "+result);