scala.reflect.internal.transform

Erasure

trait Erasure extends AnyRef

Source
Erasure.scala
Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. Erasure
  2. AnyRef
  3. Any
Visibility
  1. Public
  2. All

Type Members

  1. abstract class ErasureMap extends TypeMap

Abstract Value Members

  1. abstract val global: SymbolTable

Concrete Value Members

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

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. object GenericArray extends AnyRef

    An extractor object for generic arrays

  7. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  8. def clone(): AnyRef

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  9. final def eq(arg0: AnyRef): Boolean

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

    Definition Classes
    AnyRef → Any
  11. def erasedTypeRef(sym: Symbol): Type

    Type reference after erasure

  12. def erasure(sym: Symbol, tp: Type): Type

    The erasure |T| of a type T.

    The erasure |T| of a type T. This is:

    • For a constant type, itself.
    • For a type-bounds structure, the erasure of its upper bound.
    • For every other singleton type, the erasure of its supertype.
    • For a typeref scala.Array+[T] where T is an abstract type, AnyRef.
    • For a typeref scala.Array+[T] where T is not an abstract type, scala.Array+[|T|].
    • For a typeref scala.Any or scala.AnyVal, java.lang.Object.
    • For a typeref scala.Unit, scala.runtime.BoxedUnit.
    • For a typeref P.C[Ts] where C refers to a class, |P|.C. (Where P is first rebound to the class that directly defines C.)
    • For a typeref P.C[Ts] where C refers to an alias type, the erasure of C's alias.
    • For a typeref P.C[Ts] where C refers to an abstract type, the erasure of C's upper bound.
    • For a non-empty type intersection (possibly with refinement)
      • in scala, the erasure of the intersection dominator
      • in java, the erasure of its first parent <--- @PP: not yet in spec.
    • For an empty type intersection, java.lang.Object.
    • For a method type (Fs)scala.Unit, (|Fs|)scala#Unit.
    • For any other method type (Fs)Y, (|Fs|)|T|.
    • For a polymorphic type, the erasure of its result type.
    • For the class info type of java.lang.Object, the same type without any parents.
    • For a class info type of a value class, the same type without any parents.
    • For any other class info type with parents Ps, the same type with parents |Ps|, but with duplicate references of Object removed.
    • for all other types, the type itself (with any sub-components erased)
  13. def finalize(): Unit

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  14. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  15. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  16. def intersectionDominator(parents: List[Type]): Type

    The intersection dominator (SLS 3.

    The intersection dominator (SLS 3.7) of a list of types is computed as follows.

    • If the list contains one or more occurrences of scala.Array with type parameters El1, El2, ... then the dominator is scala.Array with type parameter of intersectionDominator(List(El1, El2, ...)). <--- @PP: not yet in spec.
    • Otherwise, the list is reduced to a subsequence containing only types which are not subtypes of other listed types (the span.)
    • If the span is empty, the dominator is Object.
    • If the span contains a class Tc which is not a trait and which is not Object, the dominator is Tc. <--- @PP: "which is not Object" not in spec.
    • Otherwise, the dominator is the first element of the span.
  17. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  18. object javaErasure extends ErasureMap

  19. final def ne(arg0: AnyRef): Boolean

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

    Definition Classes
    AnyRef
  21. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  22. def rebindInnerClass(pre: Type, cls: Symbol): Type

    Attributes
    protected
  23. object scalaErasure extends ErasureMap

    Scala's more precise erasure than java's is problematic as follows:

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

    Definition Classes
    AnyRef
  25. def toString(): String

    Definition Classes
    AnyRef → Any
  26. def transformInfo(sym: Symbol, tp: Type): Type

    The symbol's erased info.

    The symbol's erased info. This is the type's erasure, except for the following symbols:

    • For $asInstanceOf : [T]T
    • For $isInstanceOf : [T]scala#Boolean
    • For class Array : [T]C where C is the erased classinfo of the Array class.
    • For Array[T].<init> : {scala#Int)Array[T]
    • For a type parameter : A type bounds type consisting of the erasures of its bounds.
  27. def unboundedGenericArrayLevel(tp: Type): Int

    Attributes
    protected
  28. def verifyJavaErasure: Boolean

    Attributes
    protected
  29. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws()

Inherited from AnyRef

Inherited from Any