Skip to main content

Marker Interface

StructuralDecouplingLess than 1 minute


Using empty interfaces as markers to distinguish special treated objects.

Class diagram

alt text
Marker Interface


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