Here you can find the source of classToString(Class> clazz)
public static String classToString(Class<?> clazz)
//package com.java2s; //License from project: Open Source License public class Main { public static String classToString(Class<?> clazz) { if (clazz.isArray()) return classToString(clazz.getComponentType()) + "[]"; if (clazz.isPrimitive()) return clazz.toString(); return clazz.getSimpleName(); }//from www .j a v a 2 s .c o m }