Dotty Documentation


abstract class TermName
extends Name

Names for terms, can be simple or derived

[-] Constructors

TermName ( )
TermName ( name: TermName )

[-] Members

[+] type ThisName = TermName

A type for names of the same kind as this name

[+] @volatile @sharable private var _typeName : TypeName
[+] @sharable private var derivedNames : AnyRef
[+] @sharable private var myMangled : Name
[+] @sharable private var myMangledString : String
[+] private def add ( info: NameInfo ) : TermName
[+] override def asTermName : TermName

This name downcasted to a term name

[+] override def asTypeName : Nothing

This name downcasted to a type name

[+] override def derived ( info: NameInfo ) : TermName

A derived name consisting of this name and the added info, unless it is already present in this name.

[+] override def exclude ( kind: NameKind ) : TermName

This name without any info of the given kind. Excepted, as always, is the underlying name part of a qualified name.

[+] def fieldName : TermName
[+] private def getDerived ( info: NameInfo ) : DerivedName
[+] def getterName : TermName
[+] def info : NameInfo
[+] override def is ( kind: NameKind ) : Boolean

Does this name contain an info of the given kind? Excepted, as always, is the underlying name part of a qualified name.

[+] override def isTermName : Boolean

Is this name a term name?

[+] override def isTypeName : Boolean

Is this name a type name?

[+] override def likeSpaced ( name: Name ) : TermName

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

[+] protected def mangle : ThisName
[+] final def mangled : ThisName

This name converted to a simple term name and in addition with all symbolic operator characters expanded.

[+] final def mangledString : String

Convert to string after mangling

[+] private def putDerived ( info: NameInfo , name: DerivedName ) : name.type
[+] def qualToString ( f1: TermName => String , f2: TermName => String ) : String

Convert to string as follows. If this is a qualified name <first> <sep> <last>, the sanitized version of f1(<first>) <sep> f2(<last>). Otherwise f2 applied to this name.

[+] private def rewrap ( underlying: TermName ) : TermName
[+] def setterName : TermName
[+] private def shadows ( kind: NameKind , shadowed: NameKind ) : Boolean

Is it impossible that names of kind kind also qualify as names of kind shadowed?

[+] def split : ( TermName, TermName, String )

If this a qualified name, split it into underlyng, last part, and separator Otherwise return an empty name, the name itself, and "")

[+] def stripScala2LocalSuffix : TermName
[+] override def toTermName : TermName

This name converted to a term name

[+] override def toTypeName : TypeName

This name converted to a type name

[+] def toUnaryName : TermName

The name unary_x for a prefix operator x

[+] def underlying : TermName