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

define-java-callers Macro

Summary

Define multiple Java callers for methods in the same class.

Package

lw-ji

Signature

define-java-callers class-name &body method-specs => class-name

Arguments
class-name
A string.
method-specs
Lists.
Values
class-name
A string.
Description

The macro define-java-callers defines multiple Java callers for methods in the same class.

class-name must specify a Java class by its full name.

Each item of method-specs must be a list where the first element is a symbol (the Java caller name), the second element is a string (the method name) and optionally followed by keyword/value pairs for define-java-caller. define-java-callers processes each item by inserting class-name after the Java caller name, and then using the result as the arguments to define-java-caller:

(define-java-callers class-name
  (caller-name1 method-name1)
  (caller-name2 method-name2))
=>
(progn
  (define-java-caller caller-name1 class-name method-name1)
  (define-java-caller caller-name2 class-name method-name2)
  class-name)

define-java-callers is a more compact way to write several methods for the same class, but functionally it is identical to using define-java-caller explicitly.

define-java-callers returns class-name.

See also

define-java-caller


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