The function java-array-element-type
returns the element type of object if object is a Java array:
:array
.java.lang.Object
, result is :object
.java.lang.String
, result is :string
.t
.
If object is some other type of Java object, java-array-element-type
returns nil
. Otherwise it signals an error.
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.LispWorks User Guide and Reference Manual - 13 Feb 2015