Determine whether an object is of a particular type.
Determine whether an object is of a particular type. Example of use:
def foo(obj: Any) = { // Is this object of type Seq[Int] or just Int? if (isOfType[Int](obj)) ... else if (isOfType[Seq[Int]](obj)) ... else ... }
the type to test against
the object to test
true
if o
is of type T
, false
if not.
Some reflection-related utility methods and classes.