阅读背景:

使用引用初始化对象而不访问非默认构造函数

来源:互联网 

Let's suppose I have an interface named "Controller". Several classes implement this interface and I don't know these classes (e.g. the class names are located in an xml-file). Now for this Controller-implementing classes to work they have to get some references to other objects (maybe data objects). And this is my question, namely what is the best way to initialize such objects (the Controller ones)?Let's suppose I have an interface named "Contro




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: