Canonical name.
Canonical name. This name is used as a common name of wording variants (e.g., difference of capital letter usage, hyphenation, etc.)
Base class for generic surfaces with type args
Surface placeholder for supporting recursive types
Parameters of a Surface
Utility for managing names written in different spellings.
Utility for managing names written in different spellings. For example, variable name localAddress can be written as "local address", "local_address", etc.
CanonicalName is the representative name of these variants.
CName("localAddress") == CName("local address") == CName("local_address")
Create a default instance (zero) from Surface
This code is from com.softwaremill.tagging
This code is from com.softwaremill.tagging
Tag instances with arbitrary types. The tags are usually empty trait
s. Tags have no runtime overhead and are only
used at compile-time for additional type safety.
For example:
class Berry() trait Black trait Blue val berry = new Berry() val blackBerry: Berry @@ Black = berry.taggedWith[Black] val blueBerry: Berry @@ Blue = berry.taggedWith[Blue] // compile error: val anotherBlackBerry: Berry @@ Black = blueBerry
Original idea by Miles Sabin, see: https://gist.github.com/milessabin/89c9b47a91017973a35f