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

NextPrevUpTopContentsIndex

make-java-instance

Function
Summary

Create a CLOS instance and its jobject.

Package

lw-ji

Signature

make-java-instance symbol-or-class &rest args => instance

Arguments

symbol-or-class

A class designator.

args

Lisp objects.

Values

instance

A CLOS object.

Description

The function make-java-instance creates a CLOS instance and its jobject.

The class symbol-or-class must be a subclass of standard-java-object, and must have been associated with a Java constructor by passing the class name to define-java-constructor or setup-java-constructor as the class-symbol argument (the importing interface, when defining a class, does it automatically).

make-java-instance makes the CLOS instance by calling make-instance on symbol-or-class, then passing the instance and args to create-instance-jobject-list to create the jobject, and then returns the instance.

The result is a CLOS instance of symbol-or-class, which can be passed to Java interface functions and Java methods.

See also

create-instance-jobject-list
define-java-constructor
setup-java-constructor
CLOS partial integration


LispWorks User Guide and Reference Manual - 13 Feb 2015

NextPrevUpTopContentsIndex