Thanks Stuart, Bill - both answers are very useful.
On Mon, Mar 9, 2009 at 6:58 PM, .Bill Smith wrote:
>
>> Here is one way:
>>
>> (-> (into-array ["one" "two"]) (class) (.getComponentType))
>> -> java.lang.String
>> (-> (to-array ["one" "two"]) (class) (.getComponentType))
>> -> java.lang.Obj
> Here is one way:
>
> (-> (into-array ["one" "two"]) (class) (.getComponentType))
> -> java.lang.String
> (-> (to-array ["one" "two"]) (class) (.getComponentType))
> -> java.lang.Object
The above answer seems to answer the question, "How do I determine
what type of object is inside an array?"
Hi Adrian,
Here is one way:
(-> (into-array ["one" "two"]) (class) (.getComponentType))
-> java.lang.String
(-> (to-array ["one" "two"]) (class) (.getComponentType))
-> java.lang.Object
Stu
>
> I have a java object that either contains a String or an array of
> Strings.
>
> (instance? java