Acquiring generic class type

前端 未结 5 1629
轻奢々
轻奢々 2021-01-02 19:40

Hi is there any way in Java to get staticly generic class type

I have ended up with construct

    List l = new ArrayList&         


        
5条回答
  •  無奈伤痛
    2021-01-02 20:15

    The closest workaround I can think of is known as super type tokens. And of course someone thought of it before me ;) Depending on your context you may find the idea useful.

    Cheers!

提交回复
热议问题