We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
一般静态方法, 只有一种实现,new对象
抽象类里的一个抽象方法,具体的实现类中来实现, new对象
定义一个契约接口,用于生产一系列产品。 抽象类中再实现再传入这个接口的实现。 类似策略模式的实现
concrete: 具体物 concreteCreator: 具体实现类的创建
1.变量不可以持有具体类的引用 2.不要让类派生自具体类 3.不要覆盖基类中已实现的方法
NOTE: 正如许多原则一样, 应该尽量达到这个原则,而不是随时都要遵守这个原则。设计时, 多思考, 何时有足够的理由违反这样的原则。
正如许多原则一样, 应该尽量达到这个原则,而不是随时都要遵守这个原则
The text was updated successfully, but these errors were encountered:
No branches or pull requests
工厂模式
concrete: 具体物
concreteCreator: 具体实现类的创建
原则
要依赖抽象, 不要依赖具体类
NOTE:
正如许多原则一样, 应该尽量达到这个原则,而不是随时都要遵守这个原则
。设计时, 多思考, 何时有足够的理由违反这样的原则。The text was updated successfully, but these errors were encountered: