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

get-jobject

ensure-is-jobject Functions

Summary

Get the jobject of the argument.

Package

lw-ji

Signatures

get-jobject object => jobject

ensure-is-jobject object caller => jobject

Arguments
object
A Lisp object.
caller
A Lisp object.
Values
jobject
Description

The functions get-jobject and ensure-is-jobject both get the jobject of object. If object is already a jobject it is simply returned. If it is an instance of standard-java-object and has an associated jobject, this jobject is returned.

Otherwise, get-jobject returns nil but ensure-is-jobject signals an error. ensure-is-jobject uses caller in the error message to identify where the error occurred.

Notes

get-jobject is the predicate to check whether an object is a Java object.

See also

jobject-p
jobject
15.1 Types and conversion between Lisp and Java
15.8 CLOS partial integration


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