NameTransformer

dotty.tools.dotc.util.NameTransformer$

Provides functions to encode and decode Scala symbolic names.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

Replace operator expansions by the operators themselves, and decode $u.... expansions into unicode characters.

Replace operator expansions by the operators themselves, and decode $u.... expansions into unicode characters.

Attributes

Replace operator symbols by corresponding expansion strings, and replace characters that are not valid Java identifiers by "$u" followed by the character's unicode expansion. Note that no attempt is made to escape the use of '$' in name: blindly escaping them might make it impossible to call some platform APIs. This unfortunately means that decode(encode(name)) might not be equal to name, this is considered acceptable since '$' is a reserved character in the Scala spec as well as the Java spec.

Replace operator symbols by corresponding expansion strings, and replace characters that are not valid Java identifiers by "$u" followed by the character's unicode expansion. Note that no attempt is made to escape the use of '$' in name: blindly escaping them might make it impossible to call some platform APIs. This unfortunately means that decode(encode(name)) might not be equal to name, this is considered acceptable since '$' is a reserved character in the Scala spec as well as the Java spec.

Attributes