Skip to content

Latest commit

 

History

History
28 lines (20 loc) · 895 Bytes

File metadata and controls

28 lines (20 loc) · 895 Bytes
title category language tag
Marker Interface
Structural
ch
Decoupling

目的

使用空接口作为标记来区分特殊处理的对象。

类图

alt text

适用场景

在以下场景使用Marker Interface pattern

  • 您希望将特殊对象与普通对象区分开来(以不同方式处理它们)
  • 您希望标记某些对象可用于某些类型的操作

应用案例

鸣谢