dotty.tools.dotc.core.NameOps

NameDecorator

Related Doc: package NameOps

implicit final class NameDecorator[N <: Name] extends AnyVal

Linear Supertypes
AnyVal, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. NameDecorator
  2. AnyVal
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new NameDecorator(name: N)

Value Members

  1. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  2. final def ##(): Int

    Definition Classes
    Any
  3. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  4. def adjustIfModuleClass(flags: FlagSet): N

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

  5. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  6. def avoidClashName: TermName

    Append a suffix so that this name does not clash with another name in the same scope

  7. def compactified(implicit ctx: Context): TermName

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

  8. def expandedName(prefix: Name): N

  9. def expandedName(prefix: Name, separator: Name = nme.EXPAND_SEPARATOR): N

    The expanded name of name relative to basename with given separator

  10. def expandedName(base: Symbol)(implicit ctx: Context): N

  11. def expandedName(base: Symbol, separator: Name)(implicit ctx: Context): N

    The expanded name of name relative to given class base.

  12. def expandedPrefix: N

  13. def freshened(implicit ctx: Context): N

  14. def genericArrayOp: TermName

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

  15. def getClass(): Class[_ <: AnyVal]

    Definition Classes
    AnyVal → Any
  16. def implClassName: N

  17. def isAvoidClashName: Boolean

  18. def isConstructorName: Boolean

  19. def isDefaultGetterName: Boolean

  20. def isExceptionResultName: Boolean

  21. def isFieldName: Boolean

  22. def isImplClassName: Boolean

  23. def isImportName: Boolean

  24. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  25. def isLazyLocal: Boolean

  26. def isLocalDummyName: Boolean

  27. def isLoopHeaderLabel: Boolean

  28. def isModuleClassName: Boolean

  29. def isModuleVarName(name: Name): Boolean

  30. def isOpAssignmentName: Boolean

  31. def isProtectedAccessorName: Boolean

  32. def isReplWrapperName: Boolean

  33. def isScala2LocalSuffix: Boolean

  34. def isSelectorName: Boolean

  35. def isSetterName: Boolean

  36. def isShadowedName: Boolean

  37. def isSingletonName: Boolean

  38. def isStaticConstructorName: Boolean

  39. def isTraitSetterName: Boolean

  40. def isVariableName: Boolean

    Is name a variable name?

  41. def likeTyped(n: PreName): N

  42. def moduleClassName: TypeName

    Convert this module name to corresponding module class name

  43. val name: N

  44. def primitiveArrayOp: TermName

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

  45. def revertShadowed: N

  46. def segments: List[Name]

    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.

  47. def shadowedName: N

  48. def sourceModuleName: TermName

    Convert this module class name to corresponding source module name

  49. def specializedFor(classTargs: List[Type], classTargsNames: List[Name], methodTargs: List[Type], methodTarsNames: List[Name])(implicit ctx: Context): N.ThisName

  50. def stripAnonNumberSuffix: 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.

  51. def stripAvoidClashSuffix: Name

    If name ends in "avoid clash" suffix, drop it

  52. def stripModuleClassSuffix: Name

    If name ends in module class suffix, drop it

  53. def superName: TermName

    The superaccessor for method with given name

  54. def toString(): String

    Definition Classes
    Any
  55. def unexpandedName: N

    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.

Inherited from AnyVal

Inherited from Any

Ungrouped