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

lisp-to-jobject Function

Summary

Converts a Lisp object to an appropriate jobject.

Package

lw-ji

Signature

lisp-to-jobject lisp-object &optional errorp => result

Arguments
lisp-object
A Lisp object.
errorp
A generalized boolean.
Values
result
A jobject or nil.
Description

The function lisp-to-jobject tries to convert the argument lisp-object to a jobject. It succeeds if lisp-object is of a type that matches any Java primitive type or is a string. In general that means integers up to 64 bits, floats, t, nil and strings.

See 15.1 Types and conversion between Lisp and Java for a full description.

If it fails, lisp-to-jobject calls cl:error, unless errorp is nil, in which case it returns nil.

See also

jobject-to-lisp
15.1 Types and conversion between Lisp and Java


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