scala.reflect

package scala.reflect

Members list

Type members

Classlikes

trait Enum extends Product, Serializable

A base trait of all Scala enum definitions

A base trait of all Scala enum definitions

Attributes

Source
Enum.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Any
trait Selectable extends Selectable

A class that implements structural selections using Java reflection.

A class that implements structural selections using Java reflection.

It can be used as a supertrait of a class or be made available as an implicit conversion via reflectiveSelectable.

In Scala.js, it is implemented using a separate Scala.js-specific mechanism, since Java reflection is not available.

Attributes

Companion
object
Source
Selectable.scala
Supertypes
trait Selectable
class Object
trait Matchable
class Any
object Selectable

Attributes

Companion
trait
Source
Selectable.scala
Supertypes
class Object
trait Matchable
class Any
Self type
Selectable.type
trait TypeTest[-S, T] extends Serializable

A TypeTest[S, T] contains the logic needed to know at runtime if a value of type S is an instance of T.

A TypeTest[S, T] contains the logic needed to know at runtime if a value of type S is an instance of T.

If a pattern match is performed on a term of type s: S that is uncheckable with s.isInstanceOf[T] and the pattern is one of the following forms:

  • t: T
  • t @ X() where X.unapply takes an argument of type T then a given instance of TypeTest[S, T] is summoned and used to perform the test.

Attributes

Companion
object
Source
TypeTest.scala
Supertypes
trait Serializable
class Object
trait Matchable
class Any
object TypeTest

Attributes

Companion
trait
Source
TypeTest.scala
Supertypes
class Object
trait Matchable
class Any
Self type
TypeTest.type

Types

type Typeable[T] = TypeTest[Any, T]

A shorhand for TypeTest[Any, T]. A Typeable[T] contains the logic needed to know at runtime if a value can be downcasted toT`.

A shorhand for TypeTest[Any, T]. A Typeable[T] contains the logic needed to know at runtime if a value can be downcasted toT`.

If a pattern match is performed on a term of type s: Any that is uncheckable with s.isInstanceOf[T] and the pattern are of the form:

  • t: T
  • t @ X() where the X.unapply has takes an argument of type T then a given instance of Typeable[T] (TypeTest[Any, T]) is summoned and used to perform the test.

Attributes

Source
Typeable.scala