Share this page

# Java Argument List

In Java language calls to functions, a single String object is generally passed as a quoted string or a parameter in angle brackets <>, (A different bracket can be chosen if desired. Choose the Parameterization tab under Tools > General Options.) Argument lists, however, are passed as a single string array.

Within an argument list the elements are the same as those for the C language syntax. Delimiters, however, are treated differently. In C calls they are unquoted, for example, ENDITEM. In Java calls either they are quoted ("ENDITEM") or the class reference to the constant is passed (lrapi.web.ENDITEM).

There are a number of constants, which are not delimiters, that can also be passed as class references. For example, lrapi.web.RESPONSE is used where the C argument is the constant RESPONSE.

To create the string array, call new String{ <list> } where the list contains all the arguments and delimiters specified in the C syntax.

For example, the web_url syntax for C is:

int web_url( const char *Name, const char *url, <List of Attributes>, [EXTRARES, <List of Resource Attributes>,] LAST )

The syntax for Java is:

int lrapi.web.url ( String name, String url, String [ ] attributeList );

Example of C call to web url:

web_url("www.abc.com",

"URL=http://www.abc.com/",

"TargetFrame=",

"TargetBrowser=ABC Technologies",

"Resource=0",

"RecContentType=text/html",

"Snapshot=t1.inf",

"Mode=URL",

LAST);

Examples of Java calls with the same parameters:

lrapi.web.url("www.abc.com", // name

"URL=http://www.abc.com/", // url

new String [] // attributeList

{

"TargetFrame=",

"TargetBrowser=ABC Technologies",

"Resource=0",

"RecContentType=text/html",

"Snapshot=t1.inf",

"Mode=URL",

"LAST" // LAST is in quotes

} // The "new String" function block includes the entire list.

);

If the class reference for a delimiter is passed, it is still part of the new String function block, but is not quoted.

lrapi.web.url("www.abc.com", // name

"URL=http://www.abc.com/", // url

new String [] // attributeList

{

"TargetFrame=",

"TargetBrowser=ABC Technologies",

"Resource=0",

"RecContentType=text/html",

"Snapshot=t1.inf",

"Mode=URL",

lrapi.web.LAST // Class reference instead of "LAST"

} // The "new String" function block includes the entire list.

);

Tips to improve your search results... VuGen Function Reference Version 26.1 Function Reference 26.1 All View Local Help Center View Online Help Center Version: