All Downloads are FREE. Search and download functionalities are using the official Maven repository.

scala.reflect.macros.Names.scala Maven / Gradle / Ivy

There is a newer version: 2.11.2
Show newest version
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
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy