How to see if an object is an array?

Posted by edbras on Stack Overflow See other posts from Stack Overflow or by edbras
Published on 2010-04-27T22:10:59Z Indexed on 2010/04/27 22:13 UTC
Read the original article Hit count: 371

Filed under:
|

How can I see in Java if an Object is an array without using reflection? And how can I iterate through all items without using reflection?

I use Google GWT so I am not allowed to use reflection :(

I would love to implement the following methods without using refelection:

private boolean isArray(final Object obj) { ??.. }

private String toString(final Object arrayObject) { ??.. }

BTW: neither do I want to use Javascript such that I can use it in non-GWT environments

Ed

© Stack Overflow or respective owner

Related posts about java

Related posts about gwt