Arguments: name (lisp-class &rest argtypes) &optional retmod
This page has been updated since its original release with Allegro CL 6.0. The new material concerns the name argument, left out of the original release. FAQ entry 4-11 also has this correction. (The link assumes the updated FAQ is in the ../../../faq/ subdirectory with respect to this file. If the link does not work, you can find this FAQ on the Franz Inc. home page: http://www.franz.com/.)
This macro defines a Lisp method where the first argument is specialized on a class defined with def-java-class. The first argument determines the name of the Lisp function and of the corresponding Java method. If the argument is a single symbol, it is used as the name of the Lisp method and the symbol-name is used as the name of the Java method. If the first argument is a list, the first element in the list is a symbol, the name of the Lisp function, and the second element is a symbol or a string, the name of the Java method. If symbols are used to name Java methods, the symbol-name is used without any case conversion. In modern mode, this is likely to be correct and useful, but in ANSI mode it will usually be in the wrong case unless escape characters are used as needed.
The first item in the second argument is the name of a class previously defined with def-java-class. The remaining items in the second argument are strings or symbols that denote Java classes.
If the third argument is specified, it is a call modifier that is appended to every call on the Java method. If the call has an explicit modifier, the modifier in this definition is ignored.
The defined Lisp method expects as its first argument an instance of the Lisp class. Only the first argument is used to dispatch the method, the remaining arguments are bound to an &rest argument. Therefore, if two Java methods with the same name and in the same class are defined with def-java-method, they must have distinct Lisp names.
See jlinker.htm for more information on the jLinker facility.
The documentation is described in introduction.htm and the index is in index.htm.
Copyright (c) 1998-2000, Franz Inc. Berkeley, CA., USA. All rights reserved.
Created 2000.10.5.