Scala Reflection Library2.13.0 < Back


# Packages

-  package root
  Definition Classes
    root
-  package scala
  Definition Classes
    root
-  package reflect
  Definition Classes
    scala
-  package api

  EXPERIMENTAL

  EXPERIMENTAL

  The Scala Reflection API (located in scala-reflect.jar).

  In Scala 2.10.0, the Scala Reflection API and its implementation have an "experimental" status. This means that the API and the docs are not complete and can be changed in binary- and source-incompatible manner in 2.10.1. This also means that the implementation has some known issues.

  The following types are the backbone of the Scala Reflection API, and serve as a good starting point for information about Scala Reflection:

  - scala.reflect.api.Symbols
  - scala.reflect.api.Types
  - scala.reflect.api.Mirrors
  - scala.reflect.api.Universe

  For more information about Scala Reflection, see the Reflection Guide

  Definition Classes
    reflect
-  trait Scopes extends AnyRef

  EXPERIMENTAL

  EXPERIMENTAL

  This trait provides support for scopes in the reflection API.

  A scope object generally maps names to symbols available in a corresponding lexical scope. Scopes can be nested. The base type exposed to the reflection API, however, only exposes a minimal interface, representing a scope as an iterable of symbols.

  For rare occasions when it is necessary to create a scope manually, e.g., to populate members of scala.reflect.api.Types#RefinedType, there is the `newScopeWith` function.

  Additional functionality is exposed in member scopes that are returned by `members` and `decls` defined in scala.reflect.api.Types#TypeApi. Such scopes support the `sorted` method, which sorts members in declaration order.

  Definition Classes
    api
- MemberScope
- MemberScopeApi
- Scope
- ScopeApi

a

scala.reflect.api.Scopes

# MemberScope

###

#### abstract type MemberScope >: Null <: Universe.MemberScopeApi with Universe.Scope

The type of member scopes, as in class definitions, for example.

Source
  Scopes.scala

Linear Supertypes
Universe.<refinement>, Universe.MemberScopeApi, Universe.ScopeApi, collection.Iterable[Universe.Symbol], IterableFactoryDefaults[Universe.Symbol, collection.Iterable], IterableOps[Universe.Symbol, collection.Iterable, collection.Iterable[Universe.Symbol]], IterableOnceOps[Universe.Symbol, collection.Iterable, collection.Iterable[Universe.Symbol]], collection.IterableOnce[Universe.Symbol], AnyRef, Any

Ordering

1. Alphabetic
2. By Inheritance

Inherited

1. MemberScope
2. <refinement>
3. MemberScopeApi
4. ScopeApi
5. Iterable
6. IterableFactoryDefaults
7. IterableOps
8. IterableOnceOps
9. IterableOnce
10. AnyRef
11. Any

1. Hide All
2. Show All

Visibility

1. Public
2. All

### Abstract Value Members

1.  abstract def iterator: collection.Iterator[A]
   Definition Classes
     IterableOnce
2.  abstract def sorted: List[Universe.Symbol]

   Sorts the symbols included in this scope so that: 1) Symbols appear in the linearization order of their owners.

   Sorts the symbols included in this scope so that: 1) Symbols appear in the linearization order of their owners. 2) Symbols with the same owner appear in same order of their declarations. 3) Synthetic members (e.g. getters/setters for vals/vars) might appear in arbitrary order.

   Definition Classes
     MemberScopeApi

### Concrete Value Members

1.  final def !=(arg0: Any): Boolean
   Definition Classes
     AnyRef → Any
2.  final def ##(): Int
   Definition Classes
     AnyRef → Any
3.  final def ++[B >: A](suffix: collection.IterableOnce[B]): CC[B]
   Definition Classes
     IterableOps
   Annotations
     @inline()
4.  final def ==(arg0: Any): Boolean
   Definition Classes
     AnyRef → Any
5.  final def addString(b: collection.mutable.StringBuilder): collection.mutable.StringBuilder
   Definition Classes
     IterableOnceOps
   Annotations
     @inline()
6.  final def addString(b: collection.mutable.StringBuilder, sep: String): collection.mutable.StringBuilder
   Definition Classes
     IterableOnceOps
   Annotations
     @inline()
7.  def addString(b: collection.mutable.StringBuilder, start: String, sep: String, end: String): collection.mutable.StringBuilder
   Definition Classes
     IterableOnceOps
8.  final def asInstanceOf[T0]: T0
   Definition Classes
     Any
9.  def className: String
   Attributes
     protected[this]
   Definition Classes
     Iterable
10.  def clone(): AnyRef
    Attributes
      protected[java.lang]
    Definition Classes
      AnyRef
    Annotations
      @throws(classOf[java.lang.CloneNotSupportedException]) @native()
11.  final def coll: collection.Iterable.this.type
    Attributes
      protected
    Definition Classes
      Iterable → IterableOps
12.  def collect[B](pf: PartialFunction[A, B]): CC[B]
    Definition Classes
      IterableOps → IterableOnceOps
13.  def collectFirst[B](pf: PartialFunction[A, B]): Option[B]
    Definition Classes
      IterableOnceOps
14.  def concat[B >: A](suffix: collection.IterableOnce[B]): CC[B]
    Definition Classes
      IterableOps
15.  def copyToArray[B >: A](xs: Array[B], start: Int, len: Int): Int
    Definition Classes
      IterableOnceOps
16.  def copyToArray[B >: A](xs: Array[B], start: Int): Int
    Definition Classes
      IterableOnceOps
17.  def copyToArray[B >: A](xs: Array[B]): Int
    Definition Classes
      IterableOnceOps
18.  def corresponds[B](that: collection.IterableOnce[B])(p: (A, B) => Boolean): Boolean
    Definition Classes
      IterableOnceOps
19.  def count(p: (A) => Boolean): Int
    Definition Classes
      IterableOnceOps
20.  def drop(n: Int): C
    Definition Classes
      IterableOps → IterableOnceOps
21.  def dropRight(n: Int): C
    Definition Classes
      IterableOps
22.  def dropWhile(p: (A) => Boolean): C
    Definition Classes
      IterableOps → IterableOnceOps
23.  def empty: CC[A @scala.annotation.unchecked.uncheckedVariance]
    Definition Classes
      IterableFactoryDefaults → IterableOps
24.  final def eq(arg0: AnyRef): Boolean
    Definition Classes
      AnyRef
25.  def equals(arg0: AnyRef): Boolean
    Definition Classes
      AnyRef → Any
26.  def exists(p: (A) => Boolean): Boolean
    Definition Classes
      IterableOnceOps
27.  def filter(pred: (A) => Boolean): C
    Definition Classes
      IterableOps → IterableOnceOps
28.  def filterNot(pred: (A) => Boolean): C
    Definition Classes
      IterableOps → IterableOnceOps
29.  def finalize(): Unit
    Attributes
      protected[java.lang]
    Definition Classes
      AnyRef
    Annotations
      @throws(classOf[java.lang.Throwable])
30.  def find(p: (A) => Boolean): Option[A]
    Definition Classes
      IterableOnceOps
31.  def flatMap[B](f: (A) => collection.IterableOnce[B]): CC[B]
    Definition Classes
      IterableOps → IterableOnceOps
32.  def flatten[B](implicit asIterable: (A) => collection.IterableOnce[B]): CC[B]
    Definition Classes
      IterableOps → IterableOnceOps
33.  def fold[A1 >: A](z: A1)(op: (A1, A1) => A1): A1
    Definition Classes
      IterableOnceOps
34.  def foldLeft[B](z: B)(op: (B, A) => B): B
    Definition Classes
      IterableOnceOps
35.  def foldRight[B](z: B)(op: (A, B) => B): B
    Definition Classes
      IterableOnceOps
36.  def forall(p: (A) => Boolean): Boolean
    Definition Classes
      IterableOnceOps
37.  def foreach[U](f: (A) => U): Unit
    Definition Classes
      IterableOnceOps
38.  def fromSpecific(coll: collection.IterableOnce[A @scala.annotation.unchecked.uncheckedVariance]): CC[A @scala.annotation.unchecked.uncheckedVariance]
    Attributes
      protected
    Definition Classes
      IterableFactoryDefaults → IterableOps
39.  final def getClass(): Class[_ <: AnyRef]
    Definition Classes
      AnyRef → Any
    Annotations
      @native()
40.  def groupBy[K](f: (A) => K): Map[K, C]
    Definition Classes
      IterableOps
41.  def groupMap[K, B](key: (A) => K)(f: (A) => B): Map[K, CC[B]]
    Definition Classes
      IterableOps
42.  def groupMapReduce[K, B](key: (A) => K)(f: (A) => B)(reduce: (B, B) => B): Map[K, B]
    Definition Classes
      IterableOps
43.  def grouped(size: Int): collection.Iterator[C]
    Definition Classes
      IterableOps
44.  def hashCode(): Int
    Definition Classes
      AnyRef → Any
    Annotations
      @native()
45.  def head: A
    Definition Classes
      IterableOps
46.  def headOption: Option[A]
    Definition Classes
      IterableOps
47.  def init: C
    Definition Classes
      IterableOps
48.  def inits: collection.Iterator[C]
    Definition Classes
      IterableOps
49.  def isEmpty: Boolean
    Definition Classes
      IterableOnceOps
50.  final def isInstanceOf[T0]: Boolean
    Definition Classes
      Any
51.  def isTraversableAgain: Boolean
    Definition Classes
      IterableOps → IterableOnceOps
52.  def iterableFactory: IterableFactory[collection.Iterable]
    Definition Classes
      Iterable → IterableOps
53.  def knownSize: Int
    Definition Classes
      IterableOnce
54.  def last: A
    Definition Classes
      IterableOps
55.  def lastOption: Option[A]
    Definition Classes
      IterableOps
56.  def lazyZip[B](that: collection.Iterable[B]): LazyZip2[A, B, collection.Iterable.this.type]
    Definition Classes
      Iterable
57.  def map[B](f: (A) => B): CC[B]
    Definition Classes
      IterableOps → IterableOnceOps
58.  def max[B >: A](implicit ord: math.Ordering[B]): A
    Definition Classes
      IterableOnceOps
59.  def maxBy[B](f: (A) => B)(implicit cmp: math.Ordering[B]): A
    Definition Classes
      IterableOnceOps
60.  def maxByOption[B](f: (A) => B)(implicit cmp: math.Ordering[B]): Option[A]
    Definition Classes
      IterableOnceOps
61.  def maxOption[B >: A](implicit ord: math.Ordering[B]): Option[A]
    Definition Classes
      IterableOnceOps
62.  def min[B >: A](implicit ord: math.Ordering[B]): A
    Definition Classes
      IterableOnceOps
63.  def minBy[B](f: (A) => B)(implicit cmp: math.Ordering[B]): A
    Definition Classes
      IterableOnceOps
64.  def minByOption[B](f: (A) => B)(implicit cmp: math.Ordering[B]): Option[A]
    Definition Classes
      IterableOnceOps
65.  def minOption[B >: A](implicit ord: math.Ordering[B]): Option[A]
    Definition Classes
      IterableOnceOps
66.  final def mkString: String
    Definition Classes
      IterableOnceOps
    Annotations
      @inline()
67.  final def mkString(sep: String): String
    Definition Classes
      IterableOnceOps
    Annotations
      @inline()
68.  final def mkString(start: String, sep: String, end: String): String
    Definition Classes
      IterableOnceOps
69.  final def ne(arg0: AnyRef): Boolean
    Definition Classes
      AnyRef
70.  def newSpecificBuilder: Builder[A @scala.annotation.unchecked.uncheckedVariance, CC[A @scala.annotation.unchecked.uncheckedVariance]]
    Attributes
      protected
    Definition Classes
      IterableFactoryDefaults → IterableOps
71.  def nonEmpty: Boolean
    Definition Classes
      IterableOnceOps
    Annotations
      @deprecatedOverriding("nonEmpty is defined as !isEmpty; override isEmpty instead", "2.13.0")
72.  final def notify(): Unit
    Definition Classes
      AnyRef
    Annotations
      @native()
73.  final def notifyAll(): Unit
    Definition Classes
      AnyRef
    Annotations
      @native()
74.  def partition(p: (A) => Boolean): (C, C)
    Definition Classes
      IterableOps
75.  def partitionMap[A1, A2](f: (A) => Either[A1, A2]): (CC[A1], CC[A2])
    Definition Classes
      IterableOps
76.  def product[B >: A](implicit num: math.Numeric[B]): B
    Definition Classes
      IterableOnceOps
77.  def reduce[B >: A](op: (B, B) => B): B
    Definition Classes
      IterableOnceOps
78.  def reduceLeft[B >: A](op: (B, A) => B): B
    Definition Classes
      IterableOnceOps
79.  def reduceLeftOption[B >: A](op: (B, A) => B): Option[B]
    Definition Classes
      IterableOnceOps
80.  def reduceOption[B >: A](op: (B, B) => B): Option[B]
    Definition Classes
      IterableOnceOps
81.  def reduceRight[B >: A](op: (A, B) => B): B
    Definition Classes
      IterableOnceOps
82.  def reduceRightOption[B >: A](op: (A, B) => B): Option[B]
    Definition Classes
      IterableOnceOps
83.  def reversed: collection.Iterable[A]
    Attributes
      protected
    Definition Classes
      IterableOnceOps
84.  def scan[B >: A](z: B)(op: (B, B) => B): CC[B]
    Definition Classes
      IterableOps
85.  def scanLeft[B](z: B)(op: (B, A) => B): CC[B]
    Definition Classes
      IterableOps → IterableOnceOps
86.  def scanRight[B](z: B)(op: (A, B) => B): CC[B]
    Definition Classes
      IterableOps
87.  def size: Int
    Definition Classes
      IterableOnceOps
88.  def sizeCompare(that: collection.Iterable[_]): Int
    Definition Classes
      IterableOps
89.  def sizeCompare(otherSize: Int): Int
    Definition Classes
      IterableOps
90.  final def sizeIs: SizeCompareOps
    Definition Classes
      IterableOps
    Annotations
      @inline()
91.  def slice(from: Int, until: Int): C
    Definition Classes
      IterableOps → IterableOnceOps
92.  def sliding(size: Int, step: Int): collection.Iterator[C]
    Definition Classes
      IterableOps
93.  def sliding(size: Int): collection.Iterator[C]
    Definition Classes
      IterableOps
94.  def span(p: (A) => Boolean): (C, C)
    Definition Classes
      IterableOps → IterableOnceOps
95.  def splitAt(n: Int): (C, C)
    Definition Classes
      IterableOps → IterableOnceOps
96.  def stepper[S <: Stepper[_]](implicit shape: StepperShape[A, S]): S
    Definition Classes
      IterableOnce
97.  def stringPrefix: String
    Attributes
      protected[this]
    Definition Classes
      Iterable
    Annotations
      @deprecatedOverriding("Override className instead", "2.13.0")
98.  def sum[B >: A](implicit num: math.Numeric[B]): B
    Definition Classes
      IterableOnceOps
99.  final def synchronized[T0](arg0: => T0): T0
    Definition Classes
      AnyRef
100.  def tail: C
     Definition Classes
       IterableOps
101.  def tails: collection.Iterator[C]
     Definition Classes
       IterableOps
102.  def take(n: Int): C
     Definition Classes
       IterableOps → IterableOnceOps
103.  def takeRight(n: Int): C
     Definition Classes
       IterableOps
104.  def takeWhile(p: (A) => Boolean): C
     Definition Classes
       IterableOps → IterableOnceOps
105.  def tapEach[U](f: (A) => U): C
     Definition Classes
       IterableOps → IterableOnceOps
106.  def to[C1](factory: Factory[A, C1]): C1
     Definition Classes
       IterableOnceOps
107.  def toArray[B >: A](implicit arg0: ClassTag[B]): Array[B]
     Definition Classes
       IterableOnceOps
108.  final def toBuffer[B >: A]: Buffer[B]
     Definition Classes
       IterableOnceOps
     Annotations
       @inline()
109.  def toIndexedSeq: collection.immutable.IndexedSeq[A]
     Definition Classes
       IterableOnceOps
110.  final def toIterable: collection.Iterable.this.type
     Definition Classes
       Iterable → IterableOps
111.  def toList: collection.immutable.List[A]
     Definition Classes
       IterableOnceOps
112.  def toMap[K, V](implicit ev: <:<[A, (K, V)]): Map[K, V]
     Definition Classes
       IterableOnceOps
113.  def toSeq: collection.immutable.Seq[A]
     Definition Classes
       IterableOnceOps
114.  def toSet[B >: A]: Set[B]
     Definition Classes
       IterableOnceOps
115.  def toString(): String
     Definition Classes
       Iterable → AnyRef → Any
116.  def toVector: collection.immutable.Vector[A]
     Definition Classes
       IterableOnceOps
117.  def transpose[B](implicit asIterable: (A) => collection.Iterable[B]): CC[CC[B] @scala.annotation.unchecked.uncheckedVariance]
     Definition Classes
       IterableOps
118.  def unzip[A1, A2](implicit asPair: (A) => (A1, A2)): (CC[A1], CC[A2])
     Definition Classes
       IterableOps
119.  def unzip3[A1, A2, A3](implicit asTriple: (A) => (A1, A2, A3)): (CC[A1], CC[A2], CC[A3])
     Definition Classes
       IterableOps
120.  def view: View[A]
     Definition Classes
       IterableOps
121.  final def wait(): Unit
     Definition Classes
       AnyRef
     Annotations
       @throws(classOf[java.lang.InterruptedException])
122.  final def wait(arg0: Long, arg1: Int): Unit
     Definition Classes
       AnyRef
     Annotations
       @throws(classOf[java.lang.InterruptedException])
123.  final def wait(arg0: Long): Unit
     Definition Classes
       AnyRef
     Annotations
       @throws(classOf[java.lang.InterruptedException]) @native()
124.  def withFilter(p: (A) => Boolean): WithFilter[A, CC]
     Definition Classes
       IterableOps
125.  def zip[B](that: collection.IterableOnce[B]): CC[(A @scala.annotation.unchecked.uncheckedVariance, B)]
     Definition Classes
       IterableOps
126.  def zipAll[A1 >: A, B](that: collection.Iterable[B], thisElem: A1, thatElem: B): CC[(A1, B)]
     Definition Classes
       IterableOps
127.  def zipWithIndex: CC[(A @scala.annotation.unchecked.uncheckedVariance, Int)]
     Definition Classes
       IterableOps → IterableOnceOps

### Deprecated Value Members

1.  def ++:[B >: A](that: collection.IterableOnce[B]): CC[B]
   Definition Classes
     IterableOps
   Annotations
     @deprecated
   Deprecated

     (Since version 2.13.0) Use ++ instead of ++: for collections of type Iterable

2.  final def /:[B](z: B)(op: (B, A) => B): B
   Definition Classes
     IterableOnceOps
   Annotations
     @deprecated @inline()
   Deprecated

     (Since version 2.13.0) Use foldLeft instead of /:

3.  final def :\[B](z: B)(op: (A, B) => B): B
   Definition Classes
     IterableOnceOps
   Annotations
     @deprecated @inline()
   Deprecated

     (Since version 2.13.0) Use foldRight instead of :\

4.  def aggregate[B](z: => B)(seqop: (B, A) => B, combop: (B, B) => B): B
   Definition Classes
     IterableOnceOps
   Annotations
     @deprecated
   Deprecated

     (Since version 2.13.0) `aggregate` is not relevant for sequential collections. Use `foldLeft(z)(seqop)` instead.

5.  def companion: IterableFactory[CC]
   Definition Classes
     IterableOps
   Annotations
     @deprecated @deprecatedOverriding("Use iterableFactory instead", "2.13.0") @inline()
   Deprecated

     (Since version 2.13.0) Use iterableFactory instead

6.  final def copyToBuffer[B >: A](dest: Buffer[B]): Unit
   Definition Classes
     IterableOnceOps
   Annotations
     @deprecated @inline()
   Deprecated

     (Since version 2.13.0) Use `dest ++= coll` instead

7.  def hasDefiniteSize: Boolean
   Definition Classes
     IterableOnceOps
   Annotations
     @deprecated
   Deprecated

     (Since version 2.13.0) Check .knownSize instead of .hasDefiniteSize for more actionable information (see scaladoc for details)

8.  final def repr: C
   Definition Classes
     IterableOps
   Annotations
     @deprecated
   Deprecated

     (Since version 2.13.0) Use coll instead of repr in a collection implementation, use the collection value itself from the outside

9.  def seq: collection.Iterable.this.type
   Definition Classes
     Iterable
   Annotations
     @deprecated
   Deprecated

     (Since version 2.13.0) Iterable.seq always returns the iterable itself

10.  final def toIterator: collection.Iterator[A]
    Definition Classes
      IterableOnceOps
    Annotations
      @deprecated @inline()
    Deprecated

      (Since version 2.13.0) Use .iterator instead of .toIterator

11.  final def toStream: collection.immutable.Stream[A]
    Definition Classes
      IterableOnceOps
    Annotations
      @deprecated @inline()
    Deprecated

      (Since version 2.13.0) Use .to(LazyList) instead of .toStream

12.  final def toTraversable: collection.Traversable[A]
    Definition Classes
      IterableOps
    Annotations
      @deprecated
    Deprecated

      (Since version 2.13.0) Use toIterable instead

13.  def view(from: Int, until: Int): View[A]
    Definition Classes
      IterableOps
    Annotations
      @deprecated
    Deprecated

      (Since version 2.13.0) Use .view.slice(from, until) instead of .view(from, until)

### Inherited from Universe.<refinement>

### Inherited from Universe.MemberScopeApi

### Inherited from Universe.ScopeApi

### Inherited from collection.Iterable[Universe.Symbol]

### Inherited from IterableFactoryDefaults[Universe.Symbol, collection.Iterable]

### Inherited from IterableOps[Universe.Symbol, collection.Iterable, collection.Iterable[Universe.Symbol]]

### Inherited from IterableOnceOps[Universe.Symbol, collection.Iterable, collection.Iterable[Universe.Symbol]]

### Inherited from collection.IterableOnce[Universe.Symbol]

### Inherited from AnyRef

### Inherited from Any

### Ungrouped