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. Erasure
  2. AnyRef
  3. Any
Implicitly
  1. by any2stringfmt
  2. by any2stringadd
  3. by any2ArrowAssoc
  4. by any2Ensuring
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. abstract class ErasureMap extends TypeMap

  2. class JavaErasureMap extends ErasureMap

  3. class ScalaErasureMap extends ErasureMap

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

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. def +(other: String): String

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

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

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

    Definition Classes
    Any
  8. object GenericArray extends AnyRef

    An extractor object for generic arrays

  9. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  10. def clone(): AnyRef

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  11. def ensuring(cond: (Erasure) ⇒ Boolean, msg: ⇒ Any): Erasure

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

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

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

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

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

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

    Type reference after erasure

  18. def erasure(sym: Symbol): ErasureMap

    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)
  19. def finalize(): Unit

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  20. def formatted(fmtstr: String): String

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

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

    Definition Classes
    AnyRef → Any
  23. 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.
  24. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  25. object javaErasure extends JavaErasureMap

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

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

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

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

    Attributes
    protected
  30. object scalaErasure extends ScalaErasureMap

  31. val self: Any

    Implicit information
    This member is added by an implicit conversion from Erasure to StringFormat performed by method any2stringfmt in scala.Predef.
    Definition Classes
    StringFormat
  32. val self: Any

    Implicit information
    This member is added by an implicit conversion from Erasure to StringAdd performed by method any2stringadd in scala.Predef.
    Definition Classes
    StringAdd
  33. def specialErasure(sym: Symbol)(tp: Type): Type

    This is used as the Scala erasure during the erasure phase itself It differs from normal erasure in that value classes are erased to ErasedValueTypes which are then later converted to the underlying parameter type in phase posterasure.

  34. def specialErasureAvoiding(clazz: Symbol, tpe: Type): Type

  35. object specialScalaErasure extends ScalaErasureMap

    This is used as the Scala erasure during the erasure phase itself It differs from normal erasure in that value classes are erased to ErasedValueTypes which are then later converted to the underlying parameter type in phase posterasure.

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

    Definition Classes
    AnyRef
  37. def toString(): String

    Definition Classes
    AnyRef → Any
  38. 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.
  39. def unboundedGenericArrayLevel(tp: Type): Int

    Attributes
    protected
  40. def underlyingOfValueClass(clazz: Symbol): Type

  41. object verifiedJavaErasure extends JavaErasureMap

  42. def verifyJavaErasure: Boolean

    Attributes
    protected
  43. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws()
  46. def [B](y: B): (Erasure, B)

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

Deprecated Value Members

  1. def x: Erasure

    Implicit information
    This member is added by an implicit conversion from Erasure to ArrowAssoc[Erasure] performed by method any2ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use leftOfArrow instead

  2. def x: Erasure

    Implicit information
    This member is added by an implicit conversion from Erasure to Ensuring[Erasure] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use resultOfEnsuring instead

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringfmt from Erasure to StringFormat

Inherited by implicit conversion any2stringadd from Erasure to StringAdd

Inherited by implicit conversion any2ArrowAssoc from Erasure to ArrowAssoc[Erasure]

Inherited by implicit conversion any2Ensuring from Erasure to Ensuring[Erasure]