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

jvalue FLI Type Descriptor

Summary

For expert use: The FLI type descriptor corresponding to the JNI C type jvalue.

Package

lw-ji

Syntax

jvalue

Description

The FLI type jvalue is a union FLI type corresponding to the jvalue JNI C type.

The slots in the union are named by single character keywords, where the character match the C name.

jvalue slot names and their type
Lisp slot nameC slot nameslot type

:z

z

jboolean

:b

b

jbyte

:c

c

jchar

:s

s

jshort

:i

i

jint

:j

j

jlong

:f

f

jfloat

:d

d

jdouble

:l

l

jobject

Notes

In typical usage of the Java interface, you will not need to use jvalue at all.

Examples

Reading an integer from a jvalue object a-jvalue:

(fli:foreign-slot-value a-jvalue :i)

Create a jvalue object and storing a double-float in it:

(setq a-jvalue (fli:allocate-foreign-object :type 'jvalue))
(setf (fli:foreign-slot-value a-jvalue :d) 15.3d1)
See also

15.6 Utilities and administration
jvalue-store-jobject
jvalue-store-jboolean
jvalue-store-jbyte
jvalue-store-jchar
jvalue-store-jshort
jvalue-store-jint
jvalue-store-jlong
jvalue-store-jfloat
jvalue-store-jdouble


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