blob: af60dffbfc876e7df0539427268149c3a1847be9 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
package scala
package reflect
package macros
/**
* <span class="badge badge-red" style="float: right;">EXPERIMENTAL</span>
*
* A slice of [[scala.reflect.macros.blackbox.Context the Scala macros context]] that
* provides functions that generate unique names.
*/
trait Names {
self: blackbox.Context =>
/** Creates a unique string. */
@deprecated("Use freshName instead", "2.11.0")
def fresh(): String
/** Creates a unique string having a given prefix. */
@deprecated("Use freshName instead", "2.11.0")
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.
*/
@deprecated("Use freshName instead", "2.11.0")
def fresh[NameType <: Name](name: NameType): NameType
/** Creates a unique string. */
def freshName(): String
/** Creates a unique string having a given prefix. */
def freshName(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 freshName[NameType <: Name](name: NameType): NameType
}
|