Dotty Documentation

0.15.0-bin-SNAPSHOT

final class NameDecorator [ N ]
extends AnyVal

[-] Constructors

NameDecorator ( name: N )

[-] Members

[+] private val name : N
[+] def adjustIfModuleClass ( flags: FlagSet ) : N

If flags is a ModuleClass but not a Package, add module class suffix

[+] def compactified ( implicit ctx: Context ) : TermName

If name length exceeds allowable limit, replace part of it by hash

[+] def errorName : N
[+] def expandedName ( base: Symbol , kind: QualifiedNameKind ) ( implicit ctx: Context ) : N

The expanded name. This is the fully qualified name of base with ExpandPrefixName as separator, followed by kind and the name.

[+] def expandedName$default$2 : QualifiedNameKind

The expanded name. This is the fully qualified name of base with ExpandPrefixName as separator, followed by kind and the name.

[+] def freshened ( implicit ctx: Context ) : N
[+] def functionArity : Int
[+] private def functionArityFor ( prefix: String ) : Int

Parsed function arity for function with some specific prefix

[+] def genericArrayOp : TermName

The name of the generic runtime operation corresponding to an array operation

[+] def invariantName : N

Remove the variance from the name.

[+] def isAnonymousClassName : Boolean
[+] def isAnonymousFunctionName : Boolean
[+] def isConstructorName : Boolean
[+] def isErasedFunction : Boolean

Is an erased function name, i.e. one of ErasedFunctionN, ErasedImplicitFunctionN for N > 0

[+] def isFunction : Boolean

Is a function name, i.e one of FunctionXXL, FunctionN, ImplicitFunctionN for N >= 0 or ErasedFunctionN, ErasedImplicitFunctionN for N > 0

[+] def isImplicitFunction : Boolean

Is an implicit function name, i.e one of ImplicitFunctionN for N >= 0 or ErasedImplicitFunctionN for N > 0

[+] def isLocalDummyName : Boolean
[+] def isOpAssignmentName : Boolean
[+] def isPackageObjectName : Boolean

is this the name of an object enclosing packagel-level definitions?

[+] def isReplAssignName : Boolean
[+] def isReplWrapperName : Boolean
[+] def isScala2LocalSuffix : Boolean
[+] def isSelectorName : Boolean
[+] def isSetterName : Boolean
[+] def isStaticConstructorName : Boolean
[+] def isSyntheticFunction : Boolean

Is a synthetic function name, i.e. one of - FunctionN for N > 22 - ImplicitFunctionN for N >= 0 - ErasedFunctionN for N > 0 - ErasedImplicitFunctionN for N > 0

[+] def isVariableName : Boolean

Is name a variable name?

[+] private def likeSpacedN ( n: Name ) : N
[+] def moduleClassName : TypeName

Convert this module name to corresponding module class name

[+] private def natToVariance ( n: Int ) : Int

Map 0, 1 to variance value -1, +1

[+] def primitiveArrayOp : TermName

The name of the primitive runtime operation corresponding to an array operation

[+] def sourceModuleName : TermName

Convert this module class name to corresponding source module name

[+] def specializedFor ( classTargs: List [ Type ] , classTargsNames: List [ Name ] , methodTargs: List [ Type ] , methodTarsNames: List [ Name ] ) ( implicit ctx: Context ) : N
[+] def stripModuleClassSuffix : N

If name ends in module class suffix, drop it. This method needs to work on mangled as well as unmangled names because it is also called from the backend.

[+] def testSimple ( f: SimpleName => Boolean ) : Boolean
[+] def unexpandedName : N

Revert the expanded name.

[+] def unmangle ( kind: NameKind ) : N
[+] def unmangle ( kinds: List [ NameKind ] ) : N
[+] def unmangleClassName : N
[+] def variance : Int

The variance as implied by the variance prefix, or 0 if there is no variance prefix.

[+] private def varianceToNat ( v: Int ) : Int

Map variance value -1, +1 to 0, 1

[+] def withVariance ( v: Int ) : N

Name with variance prefix: + for covariant, - for contravariant