title: Explore an Array in GWT without knowing its type
body: <p>I am building a generic visualizer of objects with GWT. For this, I am using the reflection capabilities offered by <a href="https://code.google.com/p/gwt-ent/" rel="nofollow noreferrer">gwt-ent</a>. With it I can explore methods and fields and that's enough for classes. One problem I still have is that gwt-ent does not allow me to explore arrays. It gives me the type of its components, but not a get() or a set() method, as java.lang.reflection.Array does.</p>
  
  <p>So I have used the native java.lang.reflection.Array, which curiously works when in debug mode (how is that possible?), but when I go into production mode the compiler complains.</p>
  
  <p>I have tried some tricks, for instance by converting the array to an ArrayList with java.utils.Array.asList(T... a) but there's not way for making it work. I have seen a similar problem <a href="https://stackoverflow.com/questions/4972709/creating-new-array-with-class-object-in-gwt">here</a>. In that case one of the suggestion was to import the JSNI method provided byt com.google.gwt.lang.Array.createFrom(..), but I can see in <a href="http://grepcode.com/file/repo1.maven.org/maven2/com.google.gwt/gwt-dev/2.6.0/com/google/gwt/lang/Array.java" rel="nofollow noreferrer">the source code</a> that this class unfortunately has a set() method but no get() method !</p>
  
  <p>The question is: do you see any way for accessing an element of an array without knowing the type of the array in advance?</p>