SimpleName

final class SimpleName(val start: Int, val length: Int) extends TermName

A simple name is essentially an interned string

class TermName
class Name
trait Showable
class Object
trait Matchable
class Any

Type members

Inherited types

A type for names of the same kind as this name

A type for names of the same kind as this name

Inherited from:
TermName

Value members

Concrete methods

def apply(n: Int): Char

The n'th character

The n'th character

override def asSimpleName: SimpleName

This name downcasted to a simple term name

This name downcasted to a simple term name

Definition Classes
override 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.

Definition Classes

The name contains given character ch

The name contains given character ch

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.

override def decode: SimpleName

Replace operator expansions by corresponding operator symbols.

Replace operator expansions by corresponding operator symbols.

Definition Classes
override def encode: SimpleName

Replace operator symbols by corresponding operator expansions

Replace operator symbols by corresponding operator expansions

Definition Classes
override 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?

Definition Classes
override def endsWith(suffix: SimpleName): Boolean
Definition Classes

A character in this name satisfies predicate p

A character in this name satisfies predicate p

override def firstPart: SimpleName

The first part of this (possible qualified) name

The first part of this (possible qualified) name

Definition Classes

All characters in this name satisfy predicate p

All characters in this name satisfy predicate p

def getChars(from: Int, end: Int, dst: Array[Char], dstStart: Int): Unit

Copy character slice (from until end) to character array starting at dstStart.

Copy character slice (from until end) to character array starting at dstStart.

override def hashCode: Int

Calculate a hash code value for the object.

Calculate a hash code value for the object.

The default hashing algorithm is platform dependent.

Note that it is allowed for two objects to have identical hash codes (o1.hashCode.equals(o2.hashCode)) yet not be equal (o1.equals(o2) returns false). A degenerate implementation could always return 0. However, it is required that if two objects are equal (o1.equals(o2) returns true) that they have identical hash codes (o1.hashCode.equals(o2.hashCode)). Therefore, when overriding this method, be sure to verify that the behavior is consistent with the equals method.

Returns:

the hash code value for this object.

Definition Classes
Name -> Any
def head: Char
override def isEmpty: Boolean

Is this name empty?

Is this name empty?

Definition Classes
def last: Char
def lastIndexOf(ch: Char, start: Int): Int

The index of the last occurrence of ch in this name which is at most start.

The index of the last occurrence of ch in this name which is at most start.

The index of the last occurrence of str in this name

The index of the last occurrence of str in this name

override def lastPart: SimpleName

The last part of this (possible qualified) name

The last part of this (possible qualified) name

Definition Classes
final override def mangle: SimpleName
Definition Classes

Apply f to last simple term name making up this name

Apply f to last simple term name making up this name

Definition Classes

Apply f to all simple term names making up this name

Apply f to all simple term names making up this name

Definition Classes

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.

Definition Classes
override def replace(from: Char, to: Char): SimpleName

Replace all occurrences of from to to in this name

Replace all occurrences of from to to in this name

Definition Classes
def slice(from: Int, end: Int): SimpleName

A slice of this name making up the characters between from and until (exclusive)

A slice of this name making up the characters between from and until (exclusive)

def sliceToString(from: Int, end: Int): String

Same as slice, but as a string

Same as slice, but as a string

override def split: (TermName, SimpleName, 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 "")

Definition Classes
override 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?

Definition Classes
override def toSimpleName: SimpleName

This name converted to a simple term name

This name converted to a simple term name

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
override def asTermName: TermName

This name downcasted to a term name

This name downcasted to a term name

Definition Classes
Inherited from:
TermName
override def asTypeName: Nothing

This name downcasted to a type name

This name downcasted to a type name

Definition Classes
Inherited from:
TermName
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.

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

Definition Classes
Inherited from:
TermName

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
override def equals(that: Any): Boolean

Compares the receiver object (this) with the argument object (that) for equivalence.

Compares the receiver object (this) with the argument object (that) for equivalence.

Any implementation of this method should be an equivalence relation:

  • It is reflexive: for any instance x of type Any, x.equals(x) should return true.
  • It is symmetric: for any instances x and y of type Any, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any instances x, y, and z of type Any if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.

If you override this method, you should verify that your implementation remains an equivalence relation. Additionally, when overriding this method it is usually necessary to override hashCode to ensure that objects which are "equal" (o1.equals(o2) returns true) hash to the same scala.Int. (o1.hashCode.equals(o2.hashCode)).

Value parameters:
that

the object to compare against this object for equality.

Returns:

true if the receiver object is equivalent to the argument; false otherwise.

Definition Classes
Name -> Any
Inherited from:
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.

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

Definition Classes
Inherited from:
TermName
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
Inherited from:
TermName
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.

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

Definition Classes
Inherited from:
TermName
override def isTermName: Boolean

Is this name a term name?

Is this name a term name?

Definition Classes
Inherited from:
TermName
override def isTypeName: Boolean

Is this name a type name?

Is this name a type name?

Definition Classes
Inherited from:
TermName
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.

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

Definition Classes
Inherited from:
TermName
final def mangled: ThisName

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

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

Inherited from:
TermName

Convert to string after mangling

Convert to string after mangling

Inherited from:
TermName

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.

Inherited from:
TermName
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
override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Returns:

a string representation of the object.

Definition Classes
TermName -> Any
Inherited from:
TermName
override def toTermName: TermName

This name converted to a term name

This name converted to a term name

Definition Classes
Inherited from:
TermName
def toText(printer: Printer): Text

Convert name to text via printer.

Convert name to text via printer.

Inherited from:
Name
override def toTypeName: TypeName

This name converted to a type name

This name converted to a type name

Definition Classes
Inherited from:
TermName
Inherited from:
TermName

Concrete fields

val length: Int
val start: Int