Trait

scala.reflect.api

Types

Related Doc: package api

Permalink

trait Types extends AnyRef

EXPERIMENTAL

A trait that defines types and operations on them.

Type instances represent information about the type of a corresponding symbol. This includes its members (methods, fields, type parameters, nested classes, traits, etc.) either declared directly or inherited, its base types, its erasure and so on. Types also provide operations to test for type conformance or equivalence or for widening.

To instantiate a type, most of the time, the scala.reflect.api.TypeTags#typeOf method can be used. It takes a type argument and produces a Type instance which represents that argument. For example:

scala> typeOf[List[Int]]
res0: reflect.runtime.universe.Type = scala.List[Int]

In this example, a scala.reflect.api.Types#TypeRef is returned, which corresponds to the type constructor List applied to the type argument Int.

Note: Method typeOf does not work for types with type parameters, such as typeOf[List[A]] where A is a type parameter. In this case, use scala.reflect.api.TypeTags#weakTypeOf instead.

For other ways to instantiate types, see the corresponding section of the Reflection Guide.

Common Operations on Types

Types are typically used for type conformance tests or are queried for declarations of members or inner types.

Types can be queried for members and declarations by using the members and declarations methods (along with their singular counterparts member and declaration), which provide the list of definitions associated with that type. For example, to look up the map method of List, one can do:

scala> typeOf[List[_]].member("map": TermName)
res1: reflect.runtime.universe.Symbol = method map

For more information about Types, see the Reflection Guide: Symbols, Trees, and Types

Self Type
Universe
Source
Types.scala
Linear Supertypes
Known Subclasses
Type Hierarchy
Content Hierarchy
Ordering
  1. Grouped
  2. Alphabetic
  3. By Inheritance
Inherited
  1. Types
  2. AnyRef
  3. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. abstract type AnnotatedType >: Null <: Universe.AnnotatedTypeApi with Universe.Type

    Permalink

    The AnnotatedType type signature is used for annotated types of the for <type> @<annotation>.

  2. trait AnnotatedTypeApi extends Universe.TypeApi

    Permalink

    The API that all annotated types support.

    The API that all annotated types support. The main source of information about types is the scala.reflect.api.Types page.

  3. abstract class AnnotatedTypeExtractor extends AnyRef

    Permalink

    An extractor class to create and pattern match with syntax AnnotatedType(annotations, underlying).

    An extractor class to create and pattern match with syntax AnnotatedType(annotations, underlying). Here, annotations are the annotations decorating the underlying type underlying. selfSym is a symbol representing the annotated type itself.

  4. abstract type BoundedWildcardType >: Null <: Universe.BoundedWildcardTypeApi with Universe.Type

    Permalink

    BoundedWildcardTypes, used only during type inference, are created in two places:

    BoundedWildcardTypes, used only during type inference, are created in two places:

    1. If the expected type of an expression is an existential type, its hidden symbols are replaced with bounded wildcards. 2. When an implicit conversion is being sought based in part on the name of a method in the converted type, a HasMethodMatching type is created: a MethodType with parameters typed as BoundedWildcardTypes.
  5. trait BoundedWildcardTypeApi extends Universe.TypeApi

    Permalink

    The API that all this types support.

    The API that all this types support. The main source of information about types is the scala.reflect.api.Types page.

  6. abstract class BoundedWildcardTypeExtractor extends AnyRef

    Permalink

    An extractor class to create and pattern match with syntax BoundedWildcardTypeExtractor(bounds) with bounds denoting the type bounds.

  7. abstract type ClassInfoType >: Null <: Universe.ClassInfoTypeApi with Universe.CompoundType

    Permalink

    The ClassInfo type signature is used to define parents and declarations of classes, traits, and objects.

    The ClassInfo type signature is used to define parents and declarations of classes, traits, and objects. If a class, trait, or object C is declared like this

    C extends P_1 with ... with P_m { D_1; ...; D_n}

    its ClassInfo type has the following form:

    ClassInfo(List(P_1, ..., P_m), Scope(D_1, ..., D_n), C)
  8. trait ClassInfoTypeApi extends Universe.TypeApi

    Permalink

    The API that all class info types support.

    The API that all class info types support. The main source of information about types is the scala.reflect.api.Types page.

  9. abstract class ClassInfoTypeExtractor extends AnyRef

    Permalink

    An extractor class to create and pattern match with syntax ClassInfo(parents, decls, clazz) Here, parents is the list of parent types of the class, decls is the scope containing all declarations in the class, and clazz is the symbol of the class itself.

  10. abstract type CompoundType >: Null <: Universe.CompoundTypeApi with Universe.Type

    Permalink

    A subtype of Type representing refined types as well as ClassInfo signatures.

  11. trait CompoundTypeApi extends AnyRef

    Permalink

    Has no special methods.

    Has no special methods. Is here to provides erased identity for CompoundType.

  12. abstract type ConstantType >: Null <: Universe.ConstantTypeApi with Universe.SingletonType

    Permalink

    The ConstantType type is not directly written in user programs, but arises as the type of a constant.

    The ConstantType type is not directly written in user programs, but arises as the type of a constant. The REPL expresses constant types like Int(11). Here are some constants with their types:

    1           ConstantType(Constant(1))
    "abc"       ConstantType(Constant("abc"))
  13. trait ConstantTypeApi extends Universe.TypeApi

    Permalink

    The API that all constant types support.

    The API that all constant types support. The main source of information about types is the scala.reflect.api.Types page.

  14. abstract class ConstantTypeExtractor extends AnyRef

    Permalink

    An extractor class to create and pattern match with syntax ConstantType(constant) Here, constant is the constant value represented by the type.

  15. abstract type ExistentialType >: Null <: Universe.ExistentialTypeApi with Universe.Type

    Permalink

    The ExistentialType type signature is used for existential types and wildcard types.

  16. trait ExistentialTypeApi extends Universe.TypeApi

    Permalink

    The API that all existential types support.

    The API that all existential types support. The main source of information about types is the scala.reflect.api.Types page.

  17. abstract class ExistentialTypeExtractor extends AnyRef

    Permalink

    An extractor class to create and pattern match with syntax ExistentialType(quantified, underlying).

    An extractor class to create and pattern match with syntax ExistentialType(quantified, underlying). Here, quantified are the type variables bound by the existential type and underlying is the type that's existentially quantified.

  18. abstract type MethodType >: Null <: Universe.MethodTypeApi with Universe.Type

    Permalink

    The MethodType type signature is used to indicate parameters and result type of a method

  19. trait MethodTypeApi extends Universe.TypeApi

    Permalink

    The API that all method types support.

    The API that all method types support. The main source of information about types is the scala.reflect.api.Types page.

  20. abstract class MethodTypeExtractor extends AnyRef

    Permalink

    An extractor class to create and pattern match with syntax MethodType(params, respte) Here, params is a potentially empty list of parameter symbols of the method, and restpe is the result type of the method.

    An extractor class to create and pattern match with syntax MethodType(params, respte) Here, params is a potentially empty list of parameter symbols of the method, and restpe is the result type of the method. If the method is curried, restpe would be another MethodType. Note: MethodType(Nil, Int) would be the type of a method defined with an empty parameter list.

    def f(): Int

    If the method is completely parameterless, as in

    def f: Int

    its type is a NullaryMethodType.

  21. abstract type NullaryMethodType >: Null <: Universe.NullaryMethodTypeApi with Universe.Type

    Permalink

    The NullaryMethodType type signature is used for parameterless methods with declarations of the form def foo: T

  22. trait NullaryMethodTypeApi extends Universe.TypeApi

    Permalink

    The API that all nullary method types support.

    The API that all nullary method types support. The main source of information about types is the scala.reflect.api.Types page.

  23. abstract class NullaryMethodTypeExtractor extends AnyRef

    Permalink

    An extractor class to create and pattern match with syntax NullaryMethodType(resultType).

    An extractor class to create and pattern match with syntax NullaryMethodType(resultType). Here, resultType is the result type of the parameterless method.

  24. abstract type PolyType >: Null <: Universe.PolyTypeApi with Universe.Type

    Permalink

    The PolyType type signature is used for polymorphic methods that have at least one type parameter.

  25. trait PolyTypeApi extends Universe.TypeApi

    Permalink

    The API that all polymorphic types support.

    The API that all polymorphic types support. The main source of information about types is the scala.reflect.api.Types page.

  26. abstract class PolyTypeExtractor extends AnyRef

    Permalink

    An extractor class to create and pattern match with syntax PolyType(typeParams, resultType).

    An extractor class to create and pattern match with syntax PolyType(typeParams, resultType). Here, typeParams are the type parameters of the method and resultType is the type signature following the type parameters.

  27. abstract type RefinedType >: Null <: Universe.RefinedTypeApi with Universe.CompoundType

    Permalink

    The RefinedType type defines types of any of the forms on the left, with their RefinedType representations to the right.

    The RefinedType type defines types of any of the forms on the left, with their RefinedType representations to the right.

    P_1 with ... with P_m { D_1; ...; D_n}      RefinedType(List(P_1, ..., P_m), Scope(D_1, ..., D_n))
    P_1 with ... with P_m                       RefinedType(List(P_1, ..., P_m), Scope())
    { D_1; ...; D_n}                            RefinedType(List(AnyRef), Scope(D_1, ..., D_n))
  28. trait RefinedTypeApi extends Universe.TypeApi

    Permalink

    The API that all refined types support.

    The API that all refined types support. The main source of information about types is the scala.reflect.api.Types page.

  29. abstract class RefinedTypeExtractor extends AnyRef

    Permalink

    An extractor class to create and pattern match with syntax RefinedType(parents, decls) Here, parents is the list of parent types of the class, and decls is the scope containing all declarations in the class.

  30. abstract type SingleType >: Null <: Universe.SingleTypeApi with Universe.SingletonType

    Permalink

    The SingleType type describes types of any of the forms on the left, with their TypeRef representations to the right.

    The SingleType type describes types of any of the forms on the left, with their TypeRef representations to the right.

    (T # x).type             SingleType(T, x)
    p.x.type                 SingleType(p.type, x)
    x.type                   SingleType(NoPrefix, x)
  31. trait SingleTypeApi extends Universe.TypeApi

    Permalink

    The API that all single types support.

    The API that all single types support. The main source of information about types is the scala.reflect.api.Types page.

  32. abstract class SingleTypeExtractor extends AnyRef

    Permalink

    An extractor class to create and pattern match with syntax SingleType(pre, sym) Here, pre is the prefix of the single-type, and sym is the stable value symbol referred to by the single-type.

  33. abstract type SingletonType >: Null <: Universe.SingletonTypeApi with Universe.Type

    Permalink

    The type of Scala singleton types, i.e., types that are inhabited by only one nun-null value.

    The type of Scala singleton types, i.e., types that are inhabited by only one nun-null value. These include types of the forms

    C.this.type
    C.super.type
    x.type

    as well as constant types.

  34. trait SingletonTypeApi extends AnyRef

    Permalink

    Has no special methods.

    Has no special methods. Is here to provides erased identity for SingletonType.

  35. abstract type SuperType >: Null <: Universe.SuperTypeApi with Universe.SingletonType

    Permalink

    The SuperType type is not directly written, but arises when C.super is used as a prefix in a TypeRef or SingleType.

    The SuperType type is not directly written, but arises when C.super is used as a prefix in a TypeRef or SingleType. It's internal presentation is

    SuperType(thistpe, supertpe)

    Here, thistpe is the type of the corresponding this-type. For instance, in the type arising from C.super, the thistpe part would be ThisType(C). supertpe is the type of the super class referred to by the super.

  36. trait SuperTypeApi extends Universe.TypeApi

    Permalink

    The API that all super types support.

    The API that all super types support. The main source of information about types is the scala.reflect.api.Types page.

  37. abstract class SuperTypeExtractor extends AnyRef

    Permalink

    An extractor class to create and pattern match with syntax SingleType(thistpe, supertpe)

  38. abstract type ThisType >: Null <: Universe.ThisTypeApi with Universe.SingletonType

    Permalink

    A singleton type that describes types of the form on the left with the corresponding ThisType representation to the right:

    A singleton type that describes types of the form on the left with the corresponding ThisType representation to the right:

    C.this.type             ThisType(C)
  39. trait ThisTypeApi extends Universe.TypeApi

    Permalink

    The API that all this types support.

    The API that all this types support. The main source of information about types is the scala.reflect.api.Types page.

  40. abstract class ThisTypeExtractor extends AnyRef

    Permalink

    An extractor class to create and pattern match with syntax ThisType(sym) where sym is the class prefix of the this type.

  41. abstract type Type >: Null <: Universe.TypeApi

    Permalink

    The type of Scala types, and also Scala type signatures.

    The type of Scala types, and also Scala type signatures. (No difference is internally made between the two).

  42. abstract class TypeApi extends AnyRef

    Permalink

    The API of types.

    The API of types. The main source of information about types is the scala.reflect.api.Types page.

  43. abstract type TypeBounds >: Null <: Universe.TypeBoundsApi with Universe.Type

    Permalink

    The TypeBounds type signature is used to indicate lower and upper type bounds of type parameters and abstract types.

    The TypeBounds type signature is used to indicate lower and upper type bounds of type parameters and abstract types. It is not a first-class type. If an abstract type or type parameter is declared with any of the forms on the left, its type signature is the TypeBounds type on the right.

    T >: L <: U               TypeBounds(L, U)
    T >: L                    TypeBounds(L, Any)
    T <: U                    TypeBounds(Nothing, U)
  44. trait TypeBoundsApi extends Universe.TypeApi

    Permalink

    The API that all type bounds support.

    The API that all type bounds support. The main source of information about types is the scala.reflect.api.Types page.

  45. abstract class TypeBoundsExtractor extends AnyRef

    Permalink

    An extractor class to create and pattern match with syntax TypeBound(lower, upper) Here, lower is the lower bound of the TypeBounds pair, and upper is the upper bound.

  46. abstract type TypeRef >: Null <: Universe.TypeRefApi with Universe.Type

    Permalink

    The TypeRef type describes types of any of the forms on the left, with their TypeRef representations to the right.

    The TypeRef type describes types of any of the forms on the left, with their TypeRef representations to the right.

    T # C[T_1, ..., T_n]      TypeRef(T, C, List(T_1, ..., T_n))
    p.C[T_1, ..., T_n]        TypeRef(p.type, C, List(T_1, ..., T_n))
    C[T_1, ..., T_n]          TypeRef(NoPrefix, C, List(T_1, ..., T_n))
    T # C                     TypeRef(T, C, Nil)
    p.C                       TypeRef(p.type, C, Nil)
    C                         TypeRef(NoPrefix, C, Nil)
  47. trait TypeRefApi extends Universe.TypeApi

    Permalink

    The API that all type refs support.

    The API that all type refs support. The main source of information about types is the scala.reflect.api.Types page.

  48. abstract class TypeRefExtractor extends AnyRef

    Permalink

    An extractor class to create and pattern match with syntax TypeRef(pre, sym, args) Here, pre is the prefix of the type reference, sym is the symbol referred to by the type reference, and args is a possible empty list of type arguments.

Abstract Value Members

  1. abstract val AnnotatedType: Universe.AnnotatedTypeExtractor

    Permalink

    The constructor/extractor for AnnotatedType instances.

  2. abstract val BoundedWildcardType: Universe.BoundedWildcardTypeExtractor

    Permalink

    The constructor/extractor for BoundedWildcardType instances.

  3. abstract val ClassInfoType: Universe.ClassInfoTypeExtractor

    Permalink

    The constructor/extractor for ClassInfoType instances.

  4. abstract val ConstantType: Universe.ConstantTypeExtractor

    Permalink

    The constructor/extractor for ConstantType instances.

  5. abstract val ExistentialType: Universe.ExistentialTypeExtractor

    Permalink

    The constructor/extractor for ExistentialType instances.

  6. abstract val MethodType: Universe.MethodTypeExtractor

    Permalink

    The constructor/extractor for MethodType instances.

  7. abstract val NoPrefix: Universe.Type

    Permalink

    This constant is used as a special value denoting the empty prefix in a path dependent type.

    This constant is used as a special value denoting the empty prefix in a path dependent type. For instance x.type is represented as SingleType(NoPrefix, <x>), where <x> stands for the symbol for x.

  8. abstract val NoType: Universe.Type

    Permalink

    This constant is used as a special value that indicates that no meaningful type exists.

  9. abstract val NullaryMethodType: Universe.NullaryMethodTypeExtractor

    Permalink

    The constructor/extractor for NullaryMethodType instances.

  10. abstract val PolyType: Universe.PolyTypeExtractor

    Permalink

    The constructor/extractor for PolyType instances.

  11. abstract val RefinedType: Universe.RefinedTypeExtractor

    Permalink

    The constructor/extractor for RefinedType instances.

  12. abstract val SingleType: Universe.SingleTypeExtractor

    Permalink

    The constructor/extractor for SingleType instances.

  13. abstract val SuperType: Universe.SuperTypeExtractor

    Permalink

    The constructor/extractor for SuperType instances.

  14. abstract val ThisType: Universe.ThisTypeExtractor

    Permalink

    The constructor/extractor for ThisType instances.

  15. abstract val TypeBounds: Universe.TypeBoundsExtractor

    Permalink

    The constructor/extractor for TypeBounds instances.

  16. abstract val TypeRef: Universe.TypeRefExtractor

    Permalink

    The constructor/extractor for TypeRef instances.

  17. abstract val WildcardType: Universe.Type

    Permalink

    An object representing an unknown type, used during type inference.

    An object representing an unknown type, used during type inference. If you see WildcardType outside of inference it is almost certainly a bug.

  18. abstract def appliedType(sym: Universe.Symbol, args: Universe.Type*): Universe.Type

    Permalink

    See also

    appliedType

  19. abstract def appliedType(sym: Universe.Symbol, args: List[Universe.Type]): Universe.Type

    Permalink

    See also

    appliedType

  20. abstract def appliedType(tycon: Universe.Type, args: Universe.Type*): Universe.Type

    Permalink

    See also

    appliedType

  21. abstract def appliedType(tycon: Universe.Type, args: List[Universe.Type]): Universe.Type

    Permalink

    A creator for type applications

  22. abstract def glb(ts: List[Universe.Type]): Universe.Type

    Permalink

    The greatest lower bound of a list of types, as determined by <:<.

  23. abstract def lub(xs: List[Universe.Type]): Universe.Type

    Permalink

    The least upper bound of a list of types, as determined by <:<.

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink

    Test two objects for inequality.

    Test two objects for inequality.

    returns

    true if !(this == that), false otherwise.

    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink

    Equivalent to x.hashCode except for boxed numeric types and null.

    Equivalent to x.hashCode except for boxed numeric types and null. For numerics, it returns a hash value which is consistent with value equality: if two value type instances compare as true, then ## will produce the same hash value for each of them. For null returns a hashcode where null.hashCode throws a NullPointerException.

    returns

    a hash value consistent with ==

    Definition Classes
    AnyRef → Any
  3. def +(other: String): String

    Permalink
    Implicit information
    This member is added by an implicit conversion from Types to any2stringadd[Types] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (Types, B)

    Permalink
    Implicit information
    This member is added by an implicit conversion from Types to ArrowAssoc[Types] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  5. final def ==(arg0: Any): Boolean

    Permalink

    The expression x == that is equivalent to if (x eq null) that eq null else x.equals(that).

    The expression x == that is equivalent to if (x eq null) that eq null else x.equals(that).

    returns

    true if the receiver object is equivalent to the argument; false otherwise.

    Definition Classes
    AnyRef → Any
  6. final def asInstanceOf[T0]: T0

    Permalink

    Cast the receiver object to be of type T0.

    Cast the receiver object to be of type T0.

    Note that the success of a cast at runtime is modulo Scala's erasure semantics. Therefore the expression 1.asInstanceOf[String] will throw a ClassCastException at runtime, while the expression List(1).asInstanceOf[List[String]] will not. In the latter example, because the type argument is erased as part of compilation it is not possible to check whether the contents of the list are of the requested type.

    returns

    the receiver object.

    Definition Classes
    Any
    Exceptions thrown

    ClassCastException if the receiver object is not an instance of the erasure of type T0.

  7. def clone(): AnyRef

    Permalink

    Create a copy of the receiver object.

    Create a copy of the receiver object.

    The default implementation of the clone method is platform dependent.

    returns

    a copy of the receiver object.

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
    Note

    not specified by SLS as a member of AnyRef

  8. def ensuring(cond: (Types) ⇒ Boolean, msg: ⇒ Any): Types

    Permalink
    Implicit information
    This member is added by an implicit conversion from Types to Ensuring[Types] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  9. def ensuring(cond: (Types) ⇒ Boolean): Types

    Permalink
    Implicit information
    This member is added by an implicit conversion from Types to Ensuring[Types] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  10. def ensuring(cond: Boolean, msg: ⇒ Any): Types

    Permalink
    Implicit information
    This member is added by an implicit conversion from Types to Ensuring[Types] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  11. def ensuring(cond: Boolean): Types

    Permalink
    Implicit information
    This member is added by an implicit conversion from Types to Ensuring[Types] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  12. final def eq(arg0: AnyRef): Boolean

    Permalink

    Tests whether the argument (that) is a reference to the receiver object (this).

    Tests whether the argument (that) is a reference to the receiver object (this).

    The eq method implements an equivalence relation on non-null instances of AnyRef, and has three additional properties:

    • It is consistent: for any non-null instances x and y of type AnyRef, multiple invocations of x.eq(y) consistently returns true or consistently returns false.
    • For any non-null instance x of type AnyRef, x.eq(null) and null.eq(x) returns false.
    • null.eq(null) returns true.

    When overriding the equals or hashCode methods, it is important to ensure that their behavior is consistent with reference equality. Therefore, if two objects are references to each other (o1 eq o2), they should be equal to each other (o1 == o2) and they should hash to the same value (o1.hashCode == o2.hashCode).

    returns

    true if the argument is a reference to the receiver object; false otherwise.

    Definition Classes
    AnyRef
  13. def equals(arg0: Any): Boolean

    Permalink

    The equality method for reference types.

    The equality method for reference types. Default implementation delegates to eq.

    See also equals in scala.Any.

    returns

    true if the receiver object is equivalent to the argument; false otherwise.

    Definition Classes
    AnyRef → Any
  14. def finalize(): Unit

    Permalink

    Called by the garbage collector on the receiver object when there are no more references to the object.

    Called by the garbage collector on the receiver object when there are no more references to the object.

    The details of when and if the finalize method is invoked, as well as the interaction between finalize and non-local returns and exceptions, are all platform dependent.

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
    Note

    not specified by SLS as a member of AnyRef

  15. def formatted(fmtstr: String): String

    Permalink
    Implicit information
    This member is added by an implicit conversion from Types to StringFormat[Types] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  16. final def getClass(): Class[_]

    Permalink

    A representation that corresponds to the dynamic class of the receiver object.

    A representation that corresponds to the dynamic class of the receiver object.

    The nature of the representation is platform dependent.

    returns

    a representation that corresponds to the dynamic class of the receiver object.

    Definition Classes
    AnyRef → Any
    Note

    not specified by SLS as a member of AnyRef

  17. def hashCode(): Int

    Permalink

    The hashCode method for reference types.

    The hashCode method for reference types. See hashCode in scala.Any.

    returns

    the hash code value for this object.

    Definition Classes
    AnyRef → Any
  18. final def isInstanceOf[T0]: Boolean

    Permalink

    Test whether the dynamic type of the receiver object is T0.

    Test whether the dynamic type of the receiver object is T0.

    Note that the result of the test is modulo Scala's erasure semantics. Therefore the expression 1.isInstanceOf[String] will return false, while the expression List(1).isInstanceOf[List[String]] will return true. In the latter example, because the type argument is erased as part of compilation it is not possible to check whether the contents of the list are of the specified type.

    returns

    true if the receiver object is an instance of erasure of type T0; false otherwise.

    Definition Classes
    Any
  19. final def ne(arg0: AnyRef): Boolean

    Permalink

    Equivalent to !(this eq that).

    Equivalent to !(this eq that).

    returns

    true if the argument is not a reference to the receiver object; false otherwise.

    Definition Classes
    AnyRef
  20. final def notify(): Unit

    Permalink

    Wakes up a single thread that is waiting on the receiver object's monitor.

    Wakes up a single thread that is waiting on the receiver object's monitor.

    Definition Classes
    AnyRef
    Note

    not specified by SLS as a member of AnyRef

  21. final def notifyAll(): Unit

    Permalink

    Wakes up all threads that are waiting on the receiver object's monitor.

    Wakes up all threads that are waiting on the receiver object's monitor.

    Definition Classes
    AnyRef
    Note

    not specified by SLS as a member of AnyRef

  22. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  23. def toString(): String

    Permalink

    Creates a String representation of this object.

    Creates a String representation of this object. The default representation is platform dependent. On the java platform it is the concatenation of the class name, "@", and the object's hashcode in hexadecimal.

    returns

    a String representation of the object.

    Definition Classes
    AnyRef → Any
  24. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  25. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  26. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  27. def [B](y: B): (Types, B)

    Permalink
    Implicit information
    This member is added by an implicit conversion from Types to ArrowAssoc[Types] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd from Types to any2stringadd[Types]

Inherited by implicit conversion StringFormat from Types to StringFormat[Types]

Inherited by implicit conversion Ensuring from Types to Ensuring[Types]

Inherited by implicit conversion ArrowAssoc from Types to ArrowAssoc[Types]

Types - Operations

Types

API

The methods available for each reflection entity, without the implementation. Since the reflection entities are later overridden by runtime reflection and macros, their API counterparts guarantee a minimum set of methods that are implemented.

Extractors

Extractors provide the machinery necessary to allow pattern matching and construction of reflection entities that is similar to case classes, although the entities are only abstract types that are later overridden.

Ungrouped