Re: class of java array

2009-03-09 Thread Adrian Cuthbertson
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

Re: class of java array

2009-03-09 Thread .Bill Smith
> 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?"

Re: class of java array

2009-03-09 Thread Stuart Halloway
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