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

NextPrevUpTopContentsIndex

java-primitive-array-element-type

Function
Summary

Returns the element type of a Java array of a primitive element type.

Package

lw-ji

Signature

java-primitive-array-element-type object => result

Arguments

object

A Java object.

Values

result

A keyword, t or nil.

Description

The function java-primitive-array-element-type returns the element type (as a keyword as listed in Types and conversion between Lisp and Java) if object is an array with primitive element type. If object is some other type of Java object, java-primitive-array-element-type returns nil. Otherwise it signals an error.

Notes
  1. java-primitive-array-element-type is designed to be fast, so you can use it to test whether a Java object is an array of primitive element type.
  2. If you want to check whether object is any array (primitive or not), use java-array-element-type instead, Sometimes java-object-array-element-type may be more convenient.
See also

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


LispWorks User Guide and Reference Manual - 20 Sep 2017

NextPrevUpTopContentsIndex