获取通用类型
// This program is free software: you can redistribute it and/or modify //package com.nowjava; import java.lang.reflect.*; /** from n o w j a v a . c o m**/ public class Main { public static Type[] getGenericTypes(ParameterizedType t) { if (t == null) return new Type[] {}; else return t.getActualTypeArguments(); } }