Here you can find the source of typeToJavaCode(Class> type)
public static String typeToJavaCode(Class<?> type)
//package com.java2s; //License from project: Apache License public class Main { public static String typeToJavaCode(Class<?> type) { if (type.isArray()) { return type.getComponentType().getName() + "[]"; } else {//from w ww . ja v a 2s .co m return type.getName(); } } }