TermName

abstract class TermName extends Name

Names for terms, can be simple or derived

class Name
trait Showable
class Object
trait Matchable
class Any

Type members

Types

Value members

Abstract methods

protected def computeToString: String

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

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

Concrete methods

override def asTermName: TermName
Definition Classes
override def asTypeName: Nothing
Definition Classes
override def derived(info: NameInfo): TermName
Definition Classes
override def exclude(kind: NameKind): TermName
Definition Classes
override def is(kind: NameKind): Boolean
Definition Classes
override def isTermName: Boolean
Definition Classes
override def isTypeName: Boolean
Definition Classes
override def likeSpaced(name: Name): TermName
Definition Classes
final def mangled: ThisName

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.

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.

override def toString: String
Definition Classes
Any
override def toTermName: TermName
Definition Classes
override def toTypeName: TypeName
Definition Classes

Inherited methods

def ++(other: String): ThisName
Inherited from:
Name
def ++(other: Name): ThisName

Append other to the last part of this name

Append other to the last part of this name

Inherited from:
Name

This name downcasted to a simple term name

This name downcasted to a simple term name

Inherited from:
Name
def collect[T](f: PartialFunction[Name, T]): Option[T]

If partial function f is defined for some part of this name, apply it in a Some, otherwise None. Stops at derived names whose kind has definesNewName = true.

If partial function f is defined for some part of this name, apply it in a Some, otherwise None. Stops at derived names whose kind has definesNewName = true.

Inherited from:
Name

A string showing the internal structure of this name. By contrast, toString shows the name after conversion to a simple name.

A string showing the internal structure of this name. By contrast, toString shows the name after conversion to a simple name.

Inherited from:
Name

Replace operator expansions by corresponding operator symbols.

Replace operator expansions by corresponding operator symbols.

Inherited from:
Name

A derived name consisting of this name and the info of kind

A derived name consisting of this name and the info of kind

Inherited from:
Name

Replace operator symbols by corresponding operator expansions

Replace operator symbols by corresponding operator expansions

Inherited from:
Name
Inherited from:
Name
def endsWith(suffix: String): Boolean

Does (the last part of) this name end with str?

Does (the last part of) this name end with str?

Inherited from:
Name
override def equals(that: Any): Boolean
Definition Classes
Name -> Any
Inherited from:
Name
def fallbackToText(printer: Printer): Text

A fallback text representation, if the pattern matching in Printers does not have a case for this showable element

A fallback text representation, if the pattern matching in Printers does not have a case for this showable element

Inherited from:
Showable

The first part of this (possible qualified) name

The first part of this (possible qualified) name

Inherited from:
Name
override def hashCode: Int
Definition Classes
Name -> Any
Inherited from:
Name

Is this name empty?

Is this name empty?

Inherited from:
Name

The last part of this (possible qualified) name

The last part of this (possible qualified) name

Inherited from:
Name

Apply f to last simple term name making up this name

Apply f to last simple term name making up this name

Inherited from:
Name

Apply f to all simple term names making up this name

Apply f to all simple term names making up this name

Inherited from:
Name
def replace(from: Char, to: Char): ThisName

Replace all occurrences of from to to in this name

Replace all occurrences of from to to in this name

Inherited from:
Name

Apply rewrite rule given by f to some part of this name, skipping and rewrapping other decorators. Stops at derived names whose kind has definesNewName = true. If f does not apply to any part, return name unchanged.

Apply rewrite rule given by f to some part of this name, skipping and rewrapping other decorators. Stops at derived names whose kind has definesNewName = true. If f does not apply to any part, return name unchanged.

Inherited from:
Name
def show(using Context): String

The string representation of this showable element.

The string representation of this showable element.

Inherited from:
Showable
def showIndented(margin: Int)(using Context): String

The string representation with each line after the first one indented by the given given margin (in spaces).

The string representation with each line after the first one indented by the given given margin (in spaces).

Inherited from:
Showable
def showSummary(depth: Int)(using Context): String

The summarized string representation of this showable element. Recursion depth is limited to some smallish value. Default is Config.summarizeDepth.

The summarized string representation of this showable element. Recursion depth is limited to some smallish value. Default is Config.summarizeDepth.

Inherited from:
Showable
def startsWith(str: String, start: Int): Boolean

Does (the first part of) this name starting at index start starts with str?

Does (the first part of) this name starting at index start starts with str?

Inherited from:
Name

This name converted to a simple term name

This name converted to a simple term name

Inherited from:
Name
def toText(printer: Printer): Text

Convert name to text via printer.

Convert name to text via printer.

Inherited from:
Name