|
Scala example source code file (StdNames.scala)
The Scala StdNames.scala source codepackage scala.reflect package generic import scala.reflect.NameTransformer @deprecated("scala.reflect.generic will be removed", "2.9.1") trait StdNames { self: Universe => val nme: LibraryTermNames val tpnme: LibraryTypeNames def encode(str: String): TermName = newTermName(NameTransformer.encode(str)) implicit def stringToTermName(s: String): TermName = newTermName(s) trait LibraryCommonNames { type NameType <: Name implicit def createNameType(name: String): NameType val EMPTY: NameType = "" val ANON_FUN_NAME: NameType = "$anonfun" val EMPTY_PACKAGE_NAME: NameType = "<empty>" val IMPORT: NameType = "<import>" val MODULE_SUFFIX: NameType = "$module" val ROOT: NameType = "<root>" } trait LibraryTermNames extends LibraryCommonNames { val EXPAND_SEPARATOR_STRING = "$$" val LOCAL_SUFFIX_STRING = " " val ROOTPKG: NameType = "_root_" /** The expanded name of `name' relative to this class `base` with given `separator` */ def expandedName(name: TermName, base: Symbol, separator: String = EXPAND_SEPARATOR_STRING): TermName = newTermName(base.fullName('$') + separator + name) def moduleVarName(name: TermName): TermName = newTermName("" + name + MODULE_SUFFIX) } trait LibraryTypeNames extends LibraryCommonNames { val REFINE_CLASS_NAME: NameType = "<refinement>" val ANON_CLASS_NAME: NameType = "$anon" } } Other Scala examples (source code examples)Here is a short list of links related to this Scala StdNames.scala source code file: |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.