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

NextPrevUpTopContentsIndex

java-type-to-lisp-array-type

lisp-array-type-to-java-type

Functions
Summary

Return the Lisp array element type matching a supplied foreign type, or the foreign type matching a Lisp array element type.

Package

lw-ji

Signature

java-type-to-lisp-array-type jtype => l-result

Signature

lisp-array-type-to-java-type lisp-type

Arguments

jtype

A foreign type.

lisp-type

A Lisp type specifier.

Values

l-result

A Lisp array element type, or nil.

Description

The function java-type-to-lisp-array-type returns the matching Lisp array element type for the foreign type jtype, which needs to be one of the foreign types corresponding to a Java primitive type, or nil if the argument is not such a foreign type.

The function lisp-array-type-to-java-type returns the matching foreign type, corresponding to a Java primitive type, for the Lisp array element type lisp-type, or nil if there is no match.

Both functions use the table below for doing the match:

Correspondence between Java foreign types and Lisp array element types

Foreign type

Lisp type

jbyte

(signed-byte 8)

jshort

(signed-byte 16)

jint

(signed-byte 32)

jlong

(signed-byte 64)

jdouble

double-float

jfloat

single-float

jchar

(unsigned-byte 16)

jboolean

(unsigned-byte 8)


LispWorks User Guide and Reference Manual - 20 Sep 2017

NextPrevUpTopContentsIndex