abstract class Name
extends DotClass with PreName

A name is essentially a string, with three differences 1. Names belong in one of two name spaces: they are type names or term names. Term names have a sub-category of "local" field names. The same string can correspond a name in each of the three namespaces. 2. Names are hash-consed. Two names representing the same string in the same universe are always reference identical. 3. Names are intended to be encoded strings. @see dotc.util.NameTransformer. The encoding will be applied when converting a string to a name.

Constructors

Name ( )

Members

type ThisName = Nothing <: Name

A type for names of the same kind as this name

A type for names of the same kind as this name

def ++ ( other: Name ) : ThisName

A more efficient version of concatenation

A more efficient version of concatenation

def ++ ( other: String ) : ThisName
def asSimpleName : SimpleTermName
def asTermName : TermName

This name downcasted to a term name

This name downcasted to a term name

def asTypeName : TypeName

This name downcasted to a type name

This name downcasted to a type name

def collect ( f: PartialFunction [ Name, T ] ) : Option [ T ]
def debugString : String
def decode : Name

Replace $op_name's by corresponding operator symbols.

Replace $op_name's by corresponding operator symbols.

def derived ( info: NameInfo ) : ThisName
def derived ( kind: ClassifiedNameKind ) : ThisName
def encode : Name

Replace operator symbols by corresponding $op_name's.

Replace operator symbols by corresponding $op_name's.

def endsWith ( str: String ) : Boolean
override def equals ( that: Any ) : Boolean
def exclude ( kind: NameKind ) : ThisName
def firstPart : SimpleTermName
override def hashCode : Int
def is ( kind: NameKind ) : Boolean
def isEmpty : Boolean
def isSimple : Boolean
def isTermName : Boolean

Is this name a term name?

Is this name a term name?

def isTypeName : Boolean

Is this name a type name?

Is this name a type name?

def lastPart : SimpleTermName
def likeSpaced ( name: Name ) : ThisName

A name in the same (term or type) namespace as this name and with same characters as given name.

A name in the same (term or type) namespace as this name and with same characters as given name.

def mangled : Name
def mapLast ( f: SimpleTermName => SimpleTermName ) : ThisName
def mapParts ( f: SimpleTermName => SimpleTermName ) : ThisName
def replace ( from: Char , to: Char ) : ThisName
def rewrite ( f: PartialFunction [ Name, Name ] ) : ThisName
def startsWith ( str: String ) : Boolean
def toSimpleName : SimpleTermName
def toTermName : TermName

This name converted to a term name

This name converted to a term name

def toText ( printer: Printer ) : Text

The text representation of this showable element. This normally dispatches to a pattern matching method in Printers.

The text representation of this showable element. This normally dispatches to a pattern matching method in Printers.

def toTypeName : TypeName

This name converted to a type name

This name converted to a type name