def-java-class

Macro

Package: javatools.jlinker

Arguments: name supers statics fields slots &rest options

This macro defines a Lisp class that represents a Java class. Once a Lisp class is defined to represent a Java class, remote references to instances of the Java class will be instances of the corresponding Lisp class. As a result, Lisp methods may be defined.

If the name is a string or symbol, it is the name of the Java class and the corresponding symbol is the name of the Lisp class. If the name is a List, the first element is a symbol for the name of the Lisp class and the second element is a string or symbol that identifies a Java class.

The second argument is a list of Lisp superclasses. This list will be augmented by adding the class javatools.jlinker::java-class at the end.

The third and fourth arguments are lists of static and class fields in the Java class. Each item is of the form

(name [:accessor aname] [:reader rname] [:writer wname])

where name is again like the class name - a single string or symbol or a list of two.

The fifth argument is additional Lisp slots that are added to the class with no inspection of any kind. The final optional arguments are appended to the class definition.

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.