scala.reflect

Members list

Concise view

Type members

Classlikes

trait Enum extends Product with Serializable

A base trait of all Scala enum definitions

A base trait of all Scala enum definitions

Attributes

Graph
Supertypes
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
Graph
Supertypes
class Object
trait Matchable
class Any
object Selectable

Attributes

Companion:
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self 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
Graph
Supertypes
class Object
trait Matchable
class Any
object TypeTest

Attributes

Companion:
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self 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