GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • chenyulong
  • 归档
  • 分类
  • 标签
  • 设计模式
  • 手写实现ARouter
  • Glide图片加载框架原理
  • SPI原理解析
  • SharedPreferences+MMAP+MMKV数据持久化原理解析
  • ViewModel源码解析
  • LiveData&LifeCycle原理
  • Android WMS原理
  • OkHttp总结
  • Retrofit架构解析

This view

  • Original page
  • New address

GeezerVison is showing nunu03.github.io — chenyulong

2022年06月20日
Java
Gästebuch

1.工厂设计模式

简单工厂模式

适用场景:

  • 工厂类负责创建的对象较少;
  • 客户端只需要传入工厂类的参数,对于如何创建对象的逻辑不需要关心。

优点:

  • 只需要传入一个正确的参数,就可以获取你所需要的对象,无须知道其创建的细节。

缺点:

  • 不易于扩展过于复杂的产品结构。
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.