If flags is a ModuleClass but not a Package, add module class suffix
Append a suffix so that this name does not clash with another name in the same scope
If name length exceeds allowable limit, replace part of it by hash
The expanded name of name
relative to basename
with given separator
The expanded name of name
relative to given class base
.
The name of the generic runtime operation corresponding to an array operation
Is name a variable name?
Convert this module name to corresponding module class name
The name of the primitive runtime operation corresponding to an array operation
Translate a name into a list of simple TypeNames and TermNames.
Translate a name into a list of simple TypeNames and TermNames. In all segments before the last, type/term is determined by whether the following separator char is '.' or '#'. The last segment is of the same type as the original name.
Examples:
package foo { object Lorax { object Wog ; class Wog } class Lorax { object Zax ; class Zax } }
f("foo.Lorax".toTermName) == List("foo": Term, "Lorax": Term) // object Lorax f("foo.Lorax".toTypeName) == List("foo": Term, "Lorax": Type) // class Lorax f("Lorax.Wog".toTermName) == List("Lorax": Term, "Wog": Term) // object Wog f("Lorax.Wog".toTypeName) == List("Lorax": Term, "Wog": Type) // class Wog f("Lorax#Zax".toTermName) == List("Lorax": Type, "Zax": Term) // object Zax f("Lorax#Zax".toTypeName) == List("Lorax": Type, "Zax": Type) // class Zax
Note that in actual scala syntax you cannot refer to object Zax without an instance of Lorax, so Lorax#Zax could only mean the type. One might think that Lorax#Zax.type would work, but this is not accepted by the parser. For the purposes of referencing that object, the syntax is allowed.
Convert this module class name to corresponding source module name
If the name ends with $nn where nn are all digits, strip the $ and the digits.
If the name ends with $nn where nn are all digits, strip the $ and the digits. Otherwise return the argument.
If name ends in "avoid clash" suffix, drop it
If name ends in module class suffix, drop it
The superaccessor for method with given name
Revert the expanded name.
Revert the expanded name. Note: This currently gives incorrect results
if the normal name contains nme.EXPAND_SEPARATOR
, i.e. two consecutive '$'
signs. This can happen for instance if a super accessor is paired with
an encoded name, e.g. super$$plus$eq. See #765.