trait Erasure extends AnyRef
- Alphabetic
- By Inheritance
- Erasure
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
- abstract class ErasureMap extends SymbolTable.TypeMap
- class JavaErasureMap extends ErasureMap
-
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
- abstract val global: SymbolTable
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
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
-
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)
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
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.
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
rebindInnerClass(pre: SymbolTable.Type, cls: SymbolTable.Symbol): SymbolTable.Type
- Attributes
- protected
- def specialConstructorErasure(clazz: SymbolTable.Symbol, tpe: SymbolTable.Type): SymbolTable.Type
-
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.
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
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.
-
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
-
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
-
def
verifyJavaErasure: Boolean
- Attributes
- protected
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
object
GenericArray
An extractor object for generic arrays
- object boxingErasure extends ScalaErasureMap
- object javaErasure extends JavaErasureMap
- object scalaErasure extends ScalaErasureMap
-
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.
- object verifiedJavaErasure extends JavaErasureMap