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

java-array-element-type Function

Summary

Returns the element type of a Java array.

Package

lw-ji

Signature

java-array-element-type object => result

Arguments
object
A Java object.
Values
result
A keyword, t or nil.
Description

The function java-array-element-type returns the element type of object if object is a Java array:

If object is some other type of Java object, java-array-element-type returns nil. Otherwise it signals an error.

Notes
  1. java-array-element-type is designed to be fast, so it can be used as a predicate to test whether a Java object is an array, and also to check whether some specific operations are applicable to it.
  2. If you want to check whether the array is primitive or not, use java-primitive-array-element-type or java-object-array-element-type instead.
See also

java-primitive-array-element-type
java-object-array-element-type
15.4 Working with Java arrays


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