Advertisement

Marker Trait

  • John Hunt
Chapter
  • 2.6k Downloads

Abstract

The Marker Trait pattern uses traits that declare no methods, functions, types or properties to indicate additional semantics of a type (class, object or further traits). An alternative could be to use annotations, however annotations are not part of the type system of Scala, and thus can only provide additional semantic meaning where as a Marker trait also adds the ability to be treated as part of Scala the type system.

Keywords

Marker Trait Additional Semantics Semantic Indicators Marker Interface General Domain Concepts 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Copyright information

© Springer International Publishing Switzerland 2013

Authors and Affiliations

  • John Hunt
    • 1
  1. 1.Department of Computer Science and Creative TechnologiesUniversity of the West of EnglandBristolUK

Personalised recommendations