Java generic field declaration

后端 未结 5 799
天命终不由人
天命终不由人 2021-01-11 12:01

In a class without generic types I want to declare a rather complex generic field similar to these:

public class Client {
    private Map

        
5条回答
  •  [愿得一人]
    2021-01-11 12:59

    As a note it is possible to declare a class type as a field (since google sends me here for this unrelated question...)

      Class myCurrentClass = MyImplementation.class;
    

提交回复
热议问题