All Manuals > LispWorks® User Guide and Reference Manual > 39 The LW-JI Package

setup-java-caller

setup-java-constructor Functions

Summary

Define a Java caller, which is a function that calls a Java method or a constructor.

Package

lw-ji

Signatures

setup-java-caller name class-name method-name &key signatures static-p return-jobject non-virtual-p => result, condition

setup-java-constructor name class-name &key class-symbol signatures => result, condition

Arguments
name
A symbol.
class-name
A string.
method-name
A string.
signatures
A list of strings.
static-p
t, nil or :either (the default).
return-jobject
A boolean, default nil.
non-virtual-p
A boolean. default nil.
class-symbol
A symbol.
Values
result
name or nil.
condition
A condition object.
Description

The functions setup-java-caller and setup-java-constructor define a Java caller, which is a function that calls a Java method or a constructor. Once this the caller is defined, calls to name ultimately invoke the Java method or constructor.

Interpretation of class-name, method-name, signatures, static-p, return-jobject, non-virtual-p and class-symbol and the behavior of the defined caller is the same as the macros define-java-caller and define-java-constructor.

Unlike the macros define-java-caller and define-java-constructor. the functions setup-java-caller and setup-java-constructor do the lookup immediately, and therefore require running Java. If the lookup fails, they do not set the symbol function, and return two values: nil and a condition indicating the reason for the failure.

The functions (when successful) return name.

See also

define-java-caller
15.2.2 Defining specific callers


LispWorks® User Guide and Reference Manual - 01 Dec 2021 19:30:46