Packages

trait Erasure extends AnyRef

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Erasure
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. abstract class ErasureMap extends SymbolTable.TypeMap
  2. class JavaErasureMap extends ErasureMap
  3. class ScalaErasureMap extends ErasureMap

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

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

    • Symbols are read from classfiles and populated with types
    • The textual signature read from the bytecode is forgotten
    • Bytecode generation must know the precise signature of a method
    • the signature is derived from the erasure of the method type
    • If that derivation does not adhere to the rules by which the original signature was created, a NoSuchMethod error will result.

    For this reason and others (such as distinguishing constructors from other methods) erasure is now (Symbol, Type) => Type rather than Type => Type.

Abstract Value Members

  1. abstract val global: SymbolTable

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  8. def erasedValueClassArg(tref: SymbolTable.TypeRef): SymbolTable.Type

    The type of the argument of a value class reference after erasure This method needs to be called at a phase no later than erasurephase

  9. def erasure(sym: SymbolTable.Symbol): ErasureMap

    The erasure |T| of a type T.

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

    • For a constant type classOf[T], classOf[|T|], unless T is Unit. For any other 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)
  10. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  12. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  13. def intersectionDominator(parents: List[SymbolTable.Type]): SymbolTable.Type

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

    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.
  14. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  15. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  16. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  17. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  18. def rebindInnerClass(pre: SymbolTable.Type, cls: SymbolTable.Symbol): SymbolTable.Type
    Attributes
    protected
  19. def specialConstructorErasure(clazz: SymbolTable.Symbol, tpe: SymbolTable.Type): SymbolTable.Type
  20. def specialErasure(sym: SymbolTable.Symbol)(tp: SymbolTable.Type): SymbolTable.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.

  21. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  22. def toString(): String
    Definition Classes
    AnyRef → Any
  23. def transformInfo(sym: SymbolTable.Symbol, tp: SymbolTable.Type): SymbolTable.Type

    The symbol's erased info.

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

    • $asInstanceOf --> [T]T
    • $isInstanceOf --> [T]scala#Boolean
    • synchronized --> [T](x: T)T
    • class Array --> [T]C where C is the erased classinfo of the Array class.
    • Array[T].<init> --> {scala#Int)Array[T]

    An abstract type's info erases to a TypeBounds type consisting of the erasures of the abstract type's bounds.

  24. def unboundedGenericArrayLevel(tp: SymbolTable.Type): Int

    Arrays despite their finality may turn up as refined type parents, e.g.

    Arrays despite their finality may turn up as refined type parents, e.g. with "tagged types" like Array[Int] with T.

    Attributes
    protected
  25. def valueClassIsParametric(clazz: SymbolTable.Symbol): Boolean

    Does this value class have an underlying type that's a type parameter of the class itself? This method needs to be called at a phase no later than erasurephase

  26. def verifyJavaErasure: Boolean
    Attributes
    protected
  27. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  30. object GenericArray

    An extractor object for generic arrays

  31. object boxingErasure extends ScalaErasureMap
  32. object javaErasure extends JavaErasureMap
  33. object scalaErasure extends ScalaErasureMap
  34. 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 unwrapped to the underlying parameter type in phase posterasure.

  35. object verifiedJavaErasure extends JavaErasureMap

Inherited from AnyRef

Inherited from Any

Ungrouped