获取类上面的范型类

Type[] genType =getClass().getGenericInterfaces();
        for (Type type : genType) {
            if (DemoInte.class.equals(type.getClass()) ){
                Type[] params = ((ParameterizedType) type).getActualTypeArguments();
                Class aClass  =  (Class)params[0];
            }
        }

results matching ""

    No results matching ""