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 errorName: N

  9. def expandedName(prefix: Name): N

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

    The expanded name of name relative to basename with given separator

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

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

    The expanded name of name relative to given class base.

  13. def expandedPrefix: N

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

  15. def genericArrayOp: TermName

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

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

    Definition Classes
    AnyVal → Any
  17. def implClassName: N

  18. def isAvoidClashName: Boolean

  19. def isConstructorName: Boolean

  20. def isDefaultGetterName: Boolean

  21. def isExceptionResultName: Boolean

  22. def isFieldName: Boolean

  23. def isImplClassName: Boolean

  24. def isImportName: Boolean

  25. def isInlineAccessor: Boolean

  26. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  27. def isLazyLocal: Boolean

  28. def isLocalDummyName: Boolean

  29. def isLoopHeaderLabel: Boolean

  30. def isModuleClassName: Boolean

  31. def isModuleVarName(name: Name): Boolean

  32. def isOpAssignmentName: Boolean

  33. def isOuterSelect: Boolean

  34. def isProtectedAccessorName: Boolean

  35. def isReplWrapperName: Boolean

  36. def isScala2LocalSuffix: Boolean

  37. def isSelectorName: Boolean

  38. def isSetterName: Boolean

  39. def isShadowedName: Boolean

  40. def isSingletonName: Boolean

  41. def isStaticConstructorName: Boolean

  42. def isTraitSetterName: Boolean

  43. def isVariableName: Boolean

    Is name a variable name?

  44. def likeTyped(n: PreName): N

  45. def moduleClassName: TypeName

    Convert this module name to corresponding module class name

  46. val name: N

  47. def primitiveArrayOp: TermName

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

  48. def revertShadowed: N

  49. 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.

  50. def shadowedName: N

  51. def sourceModuleName: TermName

    Convert this module class name to corresponding source module name

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

  53. 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.

  54. def stripAvoidClashSuffix: Name

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

  55. def stripModuleClassSuffix: Name

    If name ends in module class suffix, drop it

  56. def superName: TermName

    The superaccessor for method with given name

  57. def toString(): String

    Definition Classes
    Any
  58. 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