Here you can find the source of listOf(Class
public static <T> List<T> listOf(Class<T> type)
//package com.java2s; //License from project: Apache License import java.util.ArrayList; import java.util.List; public class Main { public static <T> List<T> listOf(Class<T> type) { return new ArrayList<>(); }//from w w w .j a va 2 s .c o m }