private < T extends D6Model > T [ ] toArray ( List < Object > objectList , Class < T > modelClazz ) { if ( objectList == null ) { return ( T [ ] ) Array . newInstance ( modelClazz , 0 ) ; } final T [ ] resultObjects = objectList . toArray ( ( T [ ] ) Array . newInstance ( modelClazz , 0 ) ) ; return resultObjects ; }
returns Object array from Object List