Convert java.lang.reflect.Type to Class clazz

前端 未结 6 1646
闹比i
闹比i 2021-02-12 11:43

How can I convert java.lang.reflect.Type to Class clazz?

If I have one method as next which has an argument of Class

6条回答
  •  猫巷女王i
    2021-02-12 11:55

    Did you mean this?

    public  void oneMethod(T clazz) {
    
    }
    
    public void someMethod(Type type) {
        oneMethod(type);
    }
    

提交回复
热议问题