Here you can find the source of toClassArray(Collection
Parameter | Description |
---|---|
collection | the Collection to copy |
public static Class<?>[] toClassArray(Collection<Class<?>> collection)
//package com.java2s; //License from project: Open Source License import java.util.Collection; public class Main { /**/*from w w w . ja v a 2 s .c om*/ * Copy the given Collection into a Class array. * The Collection must contain Class elements only. * @param collection the Collection to copy * @return the Class array ({@code null} if the passed-in * Collection was {@code null}) */ public static Class<?>[] toClassArray(Collection<Class<?>> collection) { if (collection == null) { return null; } return collection.toArray(new Class<?>[collection.size()]); } }