scala.reflect.macros.Names.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of scala-reflect Show documentation
Show all versions of scala-reflect Show documentation
Compiler for the Scala Programming Language
package scala.reflect
package macros
/**
* EXPERIMENTAL
*
* A slice of [[scala.reflect.macros.Context the Scala macros context]] that
* provides functions that generate unique names.
*/
trait Names {
self: Context =>
/** Creates a unique string. */
def fresh(): String
/** Creates a unique string having a given prefix. */
def fresh(name: String): String
/** Creates a unique name having a given name as a prefix and
* having the same flavor (term name or type name) as the given name.
*/
def fresh[NameType <: Name](name: NameType): NameType
}