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

NextPrevUpTopContentsIndex

get-jobject

ensure-is-jobject

Functions
Summary

Get the jobject of the argument.

Package

lw-ji

Signature

get-jobject object => jobject

Signature

ensure-is-jobject object caller => jobject

Arguments

object

A Lisp object.

caller

A Lisp object.

Values

jobject

A jobject.

Description

The functions get-jobject and ensure-is-jobject both get the jobject of the object argument. 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
Types and conversion between Lisp and Java
CLOS partial integration


LispWorks User Guide and Reference Manual - 20 Sep 2017

NextPrevUpTopContentsIndex