importcontroller.ReadXMLConfig;publicenumXMLDataCollection{INSTANCE;privateReadXMLConfiginstance;XMLDataCollection(Stringxmlpath){instance=newReadXMLConfig(xmlpath);}publicReadXMLConfiggetInstance(){returninstance;}}比如这样子,,newReadXMLConfig(xmlpath),这不就要求ReadXMLConfig构造方法公开了吗,还怎么保证自己是单例?不传参数又怎么知道要读哪个xml,网上都找不到例子参考。
PIPIONE
隔江千里
相关分类