dotty.tools.dotc.core.Scopes

Scope

Related Doc: package Scopes

abstract class Scope extends DotClass with Showable with Iterable[Symbol]

A scope contains a set of symbols. It can be an extension of some outer scope, from which it inherits all symbols. This class does not have any methods to add symbols to a scope or to delete them. These methods are provided by subclass MutableScope.

Linear Supertypes
Iterable[Symbol], IterableLike[Symbol, Iterable[Symbol]], Equals, GenIterable[Symbol], GenIterableLike[Symbol, Iterable[Symbol]], Traversable[Symbol], GenTraversable[Symbol], GenericTraversableTemplate[Symbol, Iterable], TraversableLike[Symbol, Iterable[Symbol]], GenTraversableLike[Symbol, Iterable[Symbol]], Parallelizable[Symbol, ParIterable[Symbol]], TraversableOnce[Symbol], GenTraversableOnce[Symbol], FilterMonadic[Symbol, Iterable[Symbol]], HasNewBuilder[Symbol, Iterable[dotty.tools.dotc.core.Symbols.Symbol] @scala.annotation.unchecked.uncheckedVariance], Showable, DotClass, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Scope
  2. Iterable
  3. IterableLike
  4. Equals
  5. GenIterable
  6. GenIterableLike
  7. Traversable
  8. GenTraversable
  9. GenericTraversableTemplate
  10. TraversableLike
  11. GenTraversableLike
  12. Parallelizable
  13. TraversableOnce
  14. GenTraversableOnce
  15. FilterMonadic
  16. HasNewBuilder
  17. Showable
  18. DotClass
  19. AnyRef
  20. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Scope()

Type Members

  1. type Self = Iterable[Symbol]

    Attributes
    protected[this]
    Definition Classes
    TraversableLike
  2. class WithFilter extends FilterMonadic[A, Repr]

    Definition Classes
    TraversableLike

Abstract Value Members

  1. abstract def cloneScope(implicit ctx: Context): MutableScope

    Returns a new mutable scope with the same content as this one.

  2. abstract def lookupEntry(name: Name)(implicit ctx: Context): ScopeEntry

    Lookup a symbol entry matching given name.

  3. abstract def lookupNextEntry(entry: ScopeEntry)(implicit ctx: Context): ScopeEntry

    Lookup next entry with same name as this one

  4. abstract def nestingLevel: Int

    The number of outer scopes from which symbols are inherited

Concrete Value Members

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

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

    Definition Classes
    AnyRef → Any
  3. def ++[B >: Symbol, That](that: GenTraversableOnce[B])(implicit bf: CanBuildFrom[Iterable[Symbol], B, That]): That

    Definition Classes
    TraversableLike → GenTraversableLike
  4. def ++:[B >: Symbol, That](that: Traversable[B])(implicit bf: CanBuildFrom[Iterable[Symbol], B, That]): That

    Definition Classes
    TraversableLike
  5. def ++:[B >: Symbol, That](that: TraversableOnce[B])(implicit bf: CanBuildFrom[Iterable[Symbol], B, That]): That

    Definition Classes
    TraversableLike
  6. def /:[B](z: B)(op: (B, Symbol) ⇒ B): B

    Definition Classes
    TraversableOnce → GenTraversableOnce
  7. def :\[B](z: B)(op: (Symbol, B) ⇒ B): B

    Definition Classes
    TraversableOnce → GenTraversableOnce
  8. final def ==(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  9. def addString(b: StringBuilder): StringBuilder

    Definition Classes
    TraversableOnce
  10. def addString(b: StringBuilder, sep: String): StringBuilder

    Definition Classes
    TraversableOnce
  11. def addString(b: StringBuilder, start: String, sep: String, end: String): StringBuilder

    Definition Classes
    TraversableOnce
  12. def aggregate[B](z: ⇒ B)(seqop: (B, Symbol) ⇒ B, combop: (B, B) ⇒ B): B

    Definition Classes
    TraversableOnce → GenTraversableOnce
  13. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  14. def canEqual(that: Any): Boolean

    Definition Classes
    IterableLike → Equals
  15. def checkConsistent()(implicit ctx: Context): Unit

  16. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  17. def collect[B, That](pf: PartialFunction[Symbol, B])(implicit bf: CanBuildFrom[Iterable[Symbol], B, That]): That

    Definition Classes
    TraversableLike → GenTraversableLike
  18. def collectFirst[B](pf: PartialFunction[Symbol, B]): Option[B]

    Definition Classes
    TraversableOnce
  19. def companion: GenericCompanion[Iterable]

    Definition Classes
    Iterable → GenIterable → Traversable → GenTraversable → GenericTraversableTemplate
  20. def copyToArray[B >: Symbol](xs: Array[B], start: Int, len: Int): Unit

    Definition Classes
    IterableLike → TraversableLike → TraversableOnce → GenTraversableOnce
  21. def copyToArray[B >: Symbol](xs: Array[B]): Unit

    Definition Classes
    TraversableOnce → GenTraversableOnce
  22. def copyToArray[B >: Symbol](xs: Array[B], start: Int): Unit

    Definition Classes
    TraversableOnce → GenTraversableOnce
  23. def copyToBuffer[B >: Symbol](dest: Buffer[B]): Unit

    Definition Classes
    TraversableOnce
  24. def count(p: (Symbol) ⇒ Boolean): Int

    Definition Classes
    TraversableOnce → GenTraversableOnce
  25. final def denotsNamed(name: Name, select: (SymDenotation) ⇒ Boolean = selectAll)(implicit ctx: Context): PreDenotation

    The denotation set of all the symbols with given name in this scope Symbols occur in the result in reverse order relative to their occurrence in this.toList.

  26. def drop(n: Int): Iterable[Symbol]

    Definition Classes
    IterableLike → TraversableLike → GenTraversableLike
  27. def dropRight(n: Int): Iterable[Symbol]

    Definition Classes
    IterableLike
  28. def dropWhile(p: (Symbol) ⇒ Boolean): Iterable[Symbol]

    Definition Classes
    TraversableLike → GenTraversableLike
  29. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  30. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  31. def exists(p: (Symbol) ⇒ Boolean): Boolean

    Definition Classes
    IterableLike → TraversableLike → TraversableOnce → GenTraversableOnce
  32. def fallbackToText(printer: Printer): Text

    A fallback text representation, if the pattern matching in Printers does not have a case for this showable element

    A fallback text representation, if the pattern matching in Printers does not have a case for this showable element

    Definition Classes
    Showable
  33. def filter(p: (Symbol) ⇒ Boolean): Iterable[Symbol]

    Definition Classes
    TraversableLike → GenTraversableLike
  34. def filterNot(p: (Symbol) ⇒ Boolean): Iterable[Symbol]

    Definition Classes
    TraversableLike → GenTraversableLike
  35. final def filteredScope(p: (Symbol) ⇒ Boolean)(implicit ctx: Context): Scope

    The scope that keeps only those symbols from this scope that match the given predicates.

    The scope that keeps only those symbols from this scope that match the given predicates. If all symbols match, returns the scope itself, otherwise a copy with the matching symbols.

  36. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  37. def find(p: (Symbol) ⇒ Boolean): Option[Symbol]

    Definition Classes
    IterableLike → TraversableLike → TraversableOnce → GenTraversableOnce
  38. def flatMap[B, That](f: (Symbol) ⇒ GenTraversableOnce[B])(implicit bf: CanBuildFrom[Iterable[Symbol], B, That]): That

    Definition Classes
    TraversableLike → GenTraversableLike → FilterMonadic
  39. def flatten[B](implicit asTraversable: (Symbol) ⇒ GenTraversableOnce[B]): Iterable[B]

    Definition Classes
    GenericTraversableTemplate
  40. def fold[A1 >: Symbol](z: A1)(op: (A1, A1) ⇒ A1): A1

    Definition Classes
    TraversableOnce → GenTraversableOnce
  41. def foldLeft[B](z: B)(op: (B, Symbol) ⇒ B): B

    Definition Classes
    TraversableOnce → GenTraversableOnce
  42. def foldRight[B](z: B)(op: (Symbol, B) ⇒ B): B

    Definition Classes
    IterableLike → TraversableOnce → GenTraversableOnce
  43. def forall(p: (Symbol) ⇒ Boolean): Boolean

    Definition Classes
    IterableLike → TraversableLike → TraversableOnce → GenTraversableOnce
  44. def foreach[U](f: (Symbol) ⇒ U): Unit

    Definition Classes
    IterableLike → TraversableLike → GenTraversableLike → TraversableOnce → GenTraversableOnce → FilterMonadic
  45. def genericBuilder[B]: Builder[B, Iterable[B]]

    Definition Classes
    GenericTraversableTemplate
  46. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  47. def groupBy[K](f: (Symbol) ⇒ K): Map[K, Iterable[Symbol]]

    Definition Classes
    TraversableLike → GenTraversableLike
  48. def grouped(size: Int): Iterator[Iterable[Symbol]]

    Definition Classes
    IterableLike
  49. def hasDefiniteSize: Boolean

    Definition Classes
    TraversableLike → TraversableOnce → GenTraversableOnce
  50. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  51. def head: Symbol

    Definition Classes
    IterableLike → TraversableLike → GenTraversableLike
  52. def headOption: Option[Symbol]

    Definition Classes
    TraversableLike → GenTraversableLike
  53. def implicitDecls(implicit ctx: Context): List[TermRef]

  54. def init: Iterable[Symbol]

    Definition Classes
    TraversableLike → GenTraversableLike
  55. def inits: Iterator[Iterable[Symbol]]

    Definition Classes
    TraversableLike
  56. def isEmpty: Boolean

    Is the scope empty?

    Is the scope empty?

    Definition Classes
    Scope → IterableLike → GenericTraversableTemplate → TraversableLike → TraversableOnce → GenTraversableOnce
  57. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  58. final def isTraversableAgain: Boolean

    Definition Classes
    TraversableLike → GenTraversableLike → GenTraversableOnce
  59. def iterator: Iterator[Symbol]

    Return all symbols as an iterator in the order they were entered in this scope.

    Return all symbols as an iterator in the order they were entered in this scope.

    Definition Classes
    Scope → IterableLike → GenIterableLike
  60. def last: Symbol

    Definition Classes
    TraversableLike → GenTraversableLike
  61. def lastOption: Option[Symbol]

    Definition Classes
    TraversableLike → GenTraversableLike
  62. final def lookup(name: Name)(implicit ctx: Context): Symbol

    Lookup a symbol

  63. final def lookupAll(name: Name)(implicit ctx: Context): Iterator[Symbol]

    Returns an iterator yielding every symbol with given name in this scope.

  64. def map[B, That](f: (Symbol) ⇒ B)(implicit bf: CanBuildFrom[Iterable[Symbol], B, That]): That

    Definition Classes
    TraversableLike → GenTraversableLike → FilterMonadic
  65. def max[B >: Symbol](implicit cmp: Ordering[B]): Symbol

    Definition Classes
    TraversableOnce → GenTraversableOnce
  66. def maxBy[B](f: (Symbol) ⇒ B)(implicit cmp: Ordering[B]): Symbol

    Definition Classes
    TraversableOnce → GenTraversableOnce
  67. def min[B >: Symbol](implicit cmp: Ordering[B]): Symbol

    Definition Classes
    TraversableOnce → GenTraversableOnce
  68. def minBy[B](f: (Symbol) ⇒ B)(implicit cmp: Ordering[B]): Symbol

    Definition Classes
    TraversableOnce → GenTraversableOnce
  69. def mkString: String

    Definition Classes
    TraversableOnce → GenTraversableOnce
  70. def mkString(sep: String): String

    Definition Classes
    TraversableOnce → GenTraversableOnce
  71. def mkString(start: String, sep: String, end: String): String

    Definition Classes
    TraversableOnce → GenTraversableOnce
  72. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  73. def newBuilder: Builder[Symbol, Iterable[Symbol]]

    Attributes
    protected[this]
    Definition Classes
    GenericTraversableTemplate → HasNewBuilder
  74. def nonEmpty: Boolean

    Definition Classes
    TraversableOnce → GenTraversableOnce
  75. final def notify(): Unit

    Definition Classes
    AnyRef
  76. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  77. def openForMutations: MutableScope

  78. def par: ParIterable[Symbol]

    Definition Classes
    Parallelizable
  79. def parCombiner: Combiner[Symbol, ParIterable[Symbol]]

    Attributes
    protected[this]
    Definition Classes
    TraversableLike → Parallelizable
  80. def partition(p: (Symbol) ⇒ Boolean): (Iterable[Symbol], Iterable[Symbol])

    Definition Classes
    TraversableLike → GenTraversableLike
  81. def product[B >: Symbol](implicit num: Numeric[B]): B

    Definition Classes
    TraversableOnce → GenTraversableOnce
  82. def reduce[A1 >: Symbol](op: (A1, A1) ⇒ A1): A1

    Definition Classes
    TraversableOnce → GenTraversableOnce
  83. def reduceLeft[B >: Symbol](op: (B, Symbol) ⇒ B): B

    Definition Classes
    TraversableOnce
  84. def reduceLeftOption[B >: Symbol](op: (B, Symbol) ⇒ B): Option[B]

    Definition Classes
    TraversableOnce → GenTraversableOnce
  85. def reduceOption[A1 >: Symbol](op: (A1, A1) ⇒ A1): Option[A1]

    Definition Classes
    TraversableOnce → GenTraversableOnce
  86. def reduceRight[B >: Symbol](op: (Symbol, B) ⇒ B): B

    Definition Classes
    IterableLike → TraversableOnce → GenTraversableOnce
  87. def reduceRightOption[B >: Symbol](op: (Symbol, B) ⇒ B): Option[B]

    Definition Classes
    TraversableOnce → GenTraversableOnce
  88. def repr: Iterable[Symbol]

    Definition Classes
    TraversableLike → GenTraversableLike
  89. def reversed: List[Symbol]

    Attributes
    protected[this]
    Definition Classes
    TraversableOnce
  90. def sameElements[B >: Symbol](that: GenIterable[B]): Boolean

    Definition Classes
    IterableLike → GenIterableLike
  91. def scan[B >: Symbol, That](z: B)(op: (B, B) ⇒ B)(implicit cbf: CanBuildFrom[Iterable[Symbol], B, That]): That

    Definition Classes
    TraversableLike → GenTraversableLike
  92. def scanLeft[B, That](z: B)(op: (B, Symbol) ⇒ B)(implicit bf: CanBuildFrom[Iterable[Symbol], B, That]): That

    Definition Classes
    TraversableLike → GenTraversableLike
  93. def scanRight[B, That](z: B)(op: (Symbol, B) ⇒ B)(implicit bf: CanBuildFrom[Iterable[Symbol], B, That]): That

    Definition Classes
    TraversableLike → GenTraversableLike
    Annotations
    @migration
    Migration

    (Changed in version 2.9.0) The behavior of scanRight has changed. The previous behavior can be reproduced with scanRight.reverse.

  94. def seq: Iterable[Symbol]

    Definition Classes
    Iterable → GenIterable → Traversable → GenTraversable → Parallelizable → TraversableOnce → GenTraversableOnce
  95. def show(implicit ctx: Context): String

    The string representation of this showable element.

    The string representation of this showable element.

    Definition Classes
    Showable
  96. def showSummary(implicit ctx: Context): String

    Definition Classes
    Showable
  97. def showSummary(depth: Int)(implicit ctx: Context): String

    The summarized string representation of this showable element.

    The summarized string representation of this showable element. Recursion depth is limited to some smallish value. Default is Config.summarizeDepth.

    Definition Classes
    Showable
  98. def size: Int

    Definition Classes
    TraversableOnce → GenTraversableOnce
  99. def slice(from: Int, until: Int): Iterable[Symbol]

    Definition Classes
    IterableLike → TraversableLike → GenTraversableLike
  100. def sliding(size: Int, step: Int): Iterator[Iterable[Symbol]]

    Definition Classes
    IterableLike
  101. def sliding(size: Int): Iterator[Iterable[Symbol]]

    Definition Classes
    IterableLike
  102. def span(p: (Symbol) ⇒ Boolean): (Iterable[Symbol], Iterable[Symbol])

    Definition Classes
    TraversableLike → GenTraversableLike
  103. def splitAt(n: Int): (Iterable[Symbol], Iterable[Symbol])

    Definition Classes
    TraversableLike → GenTraversableLike
  104. def stringPrefix: String

    Definition Classes
    TraversableLike → GenTraversableLike
  105. def sum[B >: Symbol](implicit num: Numeric[B]): B

    Definition Classes
    TraversableOnce → GenTraversableOnce
  106. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  107. def tail: Iterable[Symbol]

    Definition Classes
    TraversableLike → GenTraversableLike
  108. def tails: Iterator[Iterable[Symbol]]

    Definition Classes
    TraversableLike
  109. def take(n: Int): Iterable[Symbol]

    Definition Classes
    IterableLike → TraversableLike → GenTraversableLike
  110. def takeRight(n: Int): Iterable[Symbol]

    Definition Classes
    IterableLike
  111. def takeWhile(p: (Symbol) ⇒ Boolean): Iterable[Symbol]

    Definition Classes
    IterableLike → TraversableLike → GenTraversableLike
  112. def thisCollection: Iterable[Symbol]

    Attributes
    protected[this]
    Definition Classes
    IterableLike → TraversableLike
  113. def to[Col[_]](implicit cbf: CanBuildFrom[Nothing, Symbol, Col[Symbol]]): Col[Symbol]

    Definition Classes
    TraversableLike → TraversableOnce → GenTraversableOnce
  114. def toArray[B >: Symbol](implicit arg0: ClassTag[B]): Array[B]

    Definition Classes
    TraversableOnce → GenTraversableOnce
  115. def toBuffer[B >: Symbol]: Buffer[B]

    Definition Classes
    TraversableOnce → GenTraversableOnce
  116. def toCollection(repr: Iterable[Symbol]): Iterable[Symbol]

    Attributes
    protected[this]
    Definition Classes
    IterableLike → TraversableLike
  117. def toIndexedSeq: IndexedSeq[Symbol]

    Definition Classes
    TraversableOnce → GenTraversableOnce
  118. def toIterable: Iterable[Symbol]

    Definition Classes
    IterableLike → TraversableOnce → GenTraversableOnce
  119. def toIterator: Iterator[Symbol]

    Definition Classes
    IterableLike → TraversableLike → GenTraversableOnce
    Annotations
    @deprecatedOverriding( ... , "2.11.0" )
  120. def toList: List[Symbol]

    Definition Classes
    TraversableOnce → GenTraversableOnce
  121. def toMap[T, U](implicit ev: <:<[Symbol, (T, U)]): Map[T, U]

    Definition Classes
    TraversableOnce → GenTraversableOnce
  122. def toSeq: Seq[Symbol]

    Definition Classes
    TraversableOnce → GenTraversableOnce
  123. def toSet[B >: Symbol]: Set[B]

    Definition Classes
    TraversableOnce → GenTraversableOnce
  124. def toStream: Stream[Symbol]

    Definition Classes
    IterableLike → TraversableLike → GenTraversableOnce
  125. def toString(): String

    Definition Classes
    TraversableLike → Any
  126. final def toText(printer: Printer): Text

    The text representation of this showable element.

    The text representation of this showable element. This normally dispatches to a pattern matching method in Printers.

    Definition Classes
    ScopeShowable
  127. def toTraversable: Traversable[Symbol]

    Definition Classes
    TraversableLike → TraversableOnce → GenTraversableOnce
    Annotations
    @deprecatedOverriding( ... , "2.11.0" )
  128. def toVector: Vector[Symbol]

    Definition Classes
    TraversableOnce → GenTraversableOnce
  129. def transpose[B](implicit asTraversable: (Symbol) ⇒ GenTraversableOnce[B]): Iterable[Iterable[B]]

    Definition Classes
    GenericTraversableTemplate
    Annotations
    @migration
    Migration

    (Changed in version 2.9.0) transpose throws an IllegalArgumentException if collections are not uniformly sized.

  130. def unsupported(methodName: String): Nothing

    Throws an UnsupportedOperationException with the given method name.

    Throws an UnsupportedOperationException with the given method name.

    Definition Classes
    DotClass
  131. def unzip[A1, A2](implicit asPair: (Symbol) ⇒ (A1, A2)): (Iterable[A1], Iterable[A2])

    Definition Classes
    GenericTraversableTemplate
  132. def unzip3[A1, A2, A3](implicit asTriple: (Symbol) ⇒ (A1, A2, A3)): (Iterable[A1], Iterable[A2], Iterable[A3])

    Definition Classes
    GenericTraversableTemplate
  133. def view(from: Int, until: Int): IterableView[Symbol, Iterable[Symbol]]

    Definition Classes
    IterableLike → TraversableLike
  134. def view: IterableView[Symbol, Iterable[Symbol]]

    Definition Classes
    IterableLike → TraversableLike
  135. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  136. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  137. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  138. def withFilter(p: (Symbol) ⇒ Boolean): FilterMonadic[Symbol, Iterable[Symbol]]

    Definition Classes
    TraversableLike → FilterMonadic
  139. def zip[A1 >: Symbol, B, That](that: GenIterable[B])(implicit bf: CanBuildFrom[Iterable[Symbol], (A1, B), That]): That

    Definition Classes
    IterableLike → GenIterableLike
  140. def zipAll[B, A1 >: Symbol, That](that: GenIterable[B], thisElem: A1, thatElem: B)(implicit bf: CanBuildFrom[Iterable[Symbol], (A1, B), That]): That

    Definition Classes
    IterableLike → GenIterableLike
  141. def zipWithIndex[A1 >: Symbol, That](implicit bf: CanBuildFrom[Iterable[Symbol], (A1, Int), That]): That

    Definition Classes
    IterableLike → GenIterableLike

Inherited from Iterable[Symbol]

Inherited from IterableLike[Symbol, Iterable[Symbol]]

Inherited from Equals

Inherited from GenIterable[Symbol]

Inherited from GenIterableLike[Symbol, Iterable[Symbol]]

Inherited from Traversable[Symbol]

Inherited from GenTraversable[Symbol]

Inherited from GenericTraversableTemplate[Symbol, Iterable]

Inherited from TraversableLike[Symbol, Iterable[Symbol]]

Inherited from GenTraversableLike[Symbol, Iterable[Symbol]]

Inherited from Parallelizable[Symbol, ParIterable[Symbol]]

Inherited from TraversableOnce[Symbol]

Inherited from GenTraversableOnce[Symbol]

Inherited from FilterMonadic[Symbol, Iterable[Symbol]]

Inherited from HasNewBuilder[Symbol, Iterable[dotty.tools.dotc.core.Symbols.Symbol] @scala.annotation.unchecked.uncheckedVariance]

Inherited from Showable

Inherited from DotClass

Inherited from AnyRef

Inherited from Any

Ungrouped