scala.reflect
Type members
Classlikes
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.
- Companion
- object
A TypeTest[S, T] contains the logic needed to know at runtime if a value of type
Scan be downcasted to
T`.
A TypeTest[S, T] contains the logic needed to know at runtime if a value of type
Scan be downcasted to
T`.
If a pattern match is performed on a term of type s: S
that is uncheckable with s.isInstanceOf[T]
and
the pattern are of the form:
t: T
t @ X()
where theX.unapply
has takes an argument of typeT
then a given instance ofTypeTest[S, T]
is summoned and used to perform the test.
- Companion
- object
Types
A shorhand for TypeTest[Any, T]
. A Typeable[T] contains the logic needed to know at runtime if a value can be downcasted to
T`.
A shorhand for TypeTest[Any, T]
. A Typeable[T] contains the logic needed to know at runtime if a value can be downcasted to
T`.
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 theX.unapply
has takes an argument of typeT
then a given instance ofTypeable[T]
(TypeTest[Any, T]
) is summoned and used to perform the test.