泛型类的getTypeParameters()方法获取到的是类的泛型参数名。
static class OOMObject<KK>{}
HeapOOM.OOMObject o=new HeapOOM.OOMObject<HeapOOM>();
List<HeapOOM.OOMObject> list=new ArrayList<>();
System.out.println(Arrays.toString( o.getClass().getTypeParameters()));
[KK]