Description: THE DESIGN PATTERNS JAVA COMPANION
1. Creational Patterns 17
The Factory Pattern 18
How a Factory Works 18
Sample Code 18
The Two Derived Classes 19
Building the Factory 20
Factory Patterns in Math Computation 22
When to Use a Factory Pattern 24
Thought Questions 25
The Abstract Factory Pattern 26
A GardenMaker Factory 26
How the User Interface Works 28
Consequences of Abstract Factory 30
Thought Questions 30
The Singleton Pattern 31
Throwing the Exception 32
Creating an Instance of the Class 32
Static Classes as Singleton Patterns 33
Creating Singleton Using a Static Method 34 Platform: |
Size: 2000760 |
Author:清风 |
Hits:
Description: THE DESIGN PATTERNS JAVA COMPANION
1. Creational Patterns 17
The Factory Pattern 18
How a Factory Works 18
Sample Code 18
The Two Derived Classes 19
Building the Factory 20
Factory Patterns in Math Computation 22
When to Use a Factory Pattern 24
Thought Questions 25
The Abstract Factory Pattern 26
A GardenMaker Factory 26
How the User Interface Works 28
Consequences of Abstract Factory 30
Thought Questions 30
The Singleton Pattern 31
Throwing the Exception 32
Creating an Instance of the Class 32
Static Classes as Singleton Patterns 33
Creating Singleton Using a Static Method 34 Platform: |
Size: 2000896 |
Author:清风 |
Hits:
Description: 工厂方法模式的意义是定义一个创建产品对象的工厂接口,将实际创建工作推迟到子类当中。核心工厂类不再负责产品的创建,这样核心类成为一个抽象工厂角色,仅负责具体工厂子类必须实现的接口,这样进一步抽象化的好处是使得工厂方法模式可以使系统在不修改具体工厂角色的情况下引进新的产品。-Factory Method Pattern is the meaning of the definition of a factory object to create products that interface, will be postponed until the actual creation of sub-class of them. Core factory class is no longer responsible for the creation of products, so that category has become the core role of an abstract factory, the factory is responsible only for the specific sub-class must implement the interface, so that the benefits of further abstract factory method is to make the system can be modified without a specific role in plant circumstances the introduction of new products. Platform: |
Size: 9216 |
Author:赵云峰 |
Hits:
Description: 这是抽象工厂模式的源代码,是用java语言编写的-This is the abstract factory pattern of the source code, is language java Platform: |
Size: 15360 |
Author:云帆 |
Hits:
Description: 在java学习过程中所编的一些简单设计模式的例子
有观察者,单例,原型,装饰者,迭代器,适配器,备忘录,状态,抽象工厂,桥接等模式-In the process of learning java, compiled by some simple examples of the observer design pattern, singleton, prototype, decorators, iterators, adapters, memos, status, Abstract Factory, Bridge mode, etc. Platform: |
Size: 37888 |
Author:wert |
Hits:
Description: 抽象工厂类,java的高级编程中的编程模式之一。还模式可以很好的结合抽象类的思想。里面有注解,可以更好的理解代码-Abstract factory class, senior java programming in one of the programming mode. Also mode can be a good combination of abstract thought. There are annotations, you can better understand the code. . Platform: |
Size: 1024 |
Author:bird |
Hits: