public static Class < ? > [ ] toClassArray ( Collection < Class < ? > > collection ) { if ( collection == null ) { return null ; } return collection . toArray ( new Class < ? > [ collection . size ( ) ] ) ; }
Copy the given Collection into a Class array . The Collection must contain Class elements only .