Files
java-design-patterns/marker
Ilkka Seppälä 932836f68b Update license plugin (#2020)
* update license plugin

* suppress linelength and emptylineseparator rules

* fix checkstyle error

Co-authored-by: Subhrodip Mohanta <hello@subho.xyz>
2022-09-14 23:22:24 +05:30
..
2019-12-07 18:03:49 +02:00
2022-09-14 23:22:24 +05:30
2017-05-03 20:51:51 +02:00
2022-09-14 23:22:24 +05:30

layout, title, folder, permalink, categories, language, tags
layout title folder permalink categories language tags
pattern Marker Interface marker /patterns/marker/ Structural en
Decoupling

Intent

Using empty interfaces as markers to distinguish special treated objects.

Class diagram

alt text

Applicability

Use the Marker Interface pattern when

  • you want to identify the special objects from normal objects (to treat them differently)
  • you want to mark that some object is available for certain sort of operations

Real world examples

Credits