今天想回又想这样回会不会很损
http://www.iteye.com/topic/833774
public class Main { public static List<String> list = new LinkedList<String>(); public static void main(String[] args) throws SecurityException, NoSuchFieldException { Type type = Main.class.getField("list").getGenericType(); if (type instanceof ParameterizedType) { ParameterizedType pt = ((ParameterizedType) type); System.out.println(pt.getActualTypeArguments()[0]); } }}