摘要:
IoC容器和DependencyInjection模式MartinFowler编者语:最近研究IoC,在网上搜索到很多网页推荐阅读MartinFowler的一片名叫InversionofControlContainersandtheDependencyInjectionpattern的文章。点击到该... 阅读全文
posted @ 2015-12-17 16:10
ChrisMurphy
阅读(2194)
评论(0)
推荐(1)
摘要:
Inversion of Control Containers and the Dependency Injection patternIn the Java community there's been a rush of lightweight containers that help to a... 阅读全文
posted @ 2015-12-17 15:55
ChrisMurphy
阅读(693)
评论(0)
推荐(0)
摘要:
父类引用指向子类对象指的是:例如父类Animal,子类Cat,Dog。其中Animal可以是类也可以是接口,Cat和Dog是继承或实现Animal的子类。Animal animal = new Cat();即声明的是父类,实际指向的是子类的一个对象。那这么使用的优点是什么,为什么要这么用?可以用这几... 阅读全文
posted @ 2015-12-17 15:13
ChrisMurphy
阅读(30167)
评论(4)
推荐(4)

浙公网安备 33010602011771号