@ SuppressWarnings ( { "unchecked" , "unused" } ) public static < T > T [ ] object2Array ( final Class < T > clazz , final Object obj ) { return ( T [ ] ) obj ; }
We try to convert an Object to an Array and this is not easy in Java so we need a little bit of nasty magic .