A decorator that provides methods for modeling type application
- Companion
- object
Value members
Concrete methods
Convert a type constructor TC
which has type parameters X1, ..., Xn
to [X1, ..., Xn] -> TC[X1, ..., Xn]
.
Convert a type constructor TC
which has type parameters X1, ..., Xn
to [X1, ..., Xn] -> TC[X1, ..., Xn]
.
Eta expand if self
is a (non-lambda) class reference and bound
is a higher-kinded type
Eta expand if self
is a (non-lambda) class reference and bound
is a higher-kinded type
The type representing
The type representing
T[U1, ..., Un]
where
- Value Params
- args
=
U1,...,Un
- self
=
T
If this is the image of a type argument; recover the type argument, otherwise NoType.
If this is the image of a type argument; recover the type argument, otherwise NoType.
If this is an encoding of a (partially) applied type, return its arguments, otherwise return Nil. Existential types in arguments are returned as TypeBounds instances.
If this is an encoding of a (partially) applied type, return its arguments, otherwise return Nil. Existential types in arguments are returned as TypeBounds instances.
Argument types where existential types in arguments are disallowed
Argument types where existential types in arguments are disallowed
Argument types where existential types in arguments are approximated by their upper bound
Argument types where existential types in arguments are approximated by their upper bound
Argument types where existential types in arguments are approximated by their lower bound
Argument types where existential types in arguments are approximated by their lower bound
If this is a type alias, its underlying type, otherwise the type itself
If this is a type alias, its underlying type, otherwise the type itself
Do self and other have the same kinds (not counting bounds and variances)? Note: An any-kinded type "has the same kind" as any other type.
Do self and other have the same kinds (not counting bounds and variances)? Note: An any-kinded type "has the same kind" as any other type.
If self type is higher-kinded, its result type, otherwise NoType. Note: The hkResult of an any-kinded type is again AnyKind.
If self type is higher-kinded, its result type, otherwise NoType. Note: The hkResult of an any-kinded type is again AnyKind.
If self
is a higher-kinded type, its type parameters, otherwise Nil
If self
is a higher-kinded type, its type parameters, otherwise Nil
A cycle-safe version of appliedTo
where computing type parameters do not force
the typeconstructor. Instead, if the type constructor is completing, we make
up hk type parameters matching the arguments. This is needed when unpickling
Scala2 files such as scala.collection.generic.Mapfactory
.
A cycle-safe version of appliedTo
where computing type parameters do not force
the typeconstructor. Instead, if the type constructor is completing, we make
up hk type parameters matching the arguments. This is needed when unpickling
Scala2 files such as scala.collection.generic.Mapfactory
.
Dealias type if it can be done without forcing the TypeRef's info
Dealias type if it can be done without forcing the TypeRef's info
Turns non-bounds types to type bounds. A (possible lambda abstracted) match type is turned into a match alias. Every other type is turned into a type alias
Turns non-bounds types to type bounds. A (possible lambda abstracted) match type is turned into a match alias. Every other type is turned into a type alias
If this is a repeated parameter *T
, translate it to either Seq[T]
or
Array[? <: T]
depending on the value of toArray
.
Additionally, if translateWildcard
is true, a wildcard type
will be translated to *<?>
.
Other types are kept as-is.
If this is a repeated parameter *T
, translate it to either Seq[T]
or
Array[? <: T]
depending on the value of toArray
.
Additionally, if translateWildcard
is true, a wildcard type
will be translated to *<?>
.
Other types are kept as-is.
Translate T
to T & Object
in the situations where an Array[T]
coming from Java would need to be interpreted as an Array[T & Object]
to be erased correctly.
Translate T
to T & Object
in the situations where an Array[T]
coming from Java would need to be interpreted as an Array[T & Object]
to be erased correctly.
Object
is the top-level type in Java, but when it appears in a Java
signature we replace it by a special FromJavaObject
type for
convenience, this in turns requires us to special-case generic arrays as
described in case 3 in the documentation of FromJavaObjectSymbol
. This
is necessary because a fully generic Java array erases to an array of
Object, whereas a fully generic Scala array erases to Object to allow
primitive arrays as subtypes.
Note: According to http://cr.openjdk.java.net/~briangoetz/valhalla/sov/02-object-model.html, it's possible that future JVMs will consider that:
int[] <: Integer[] <: Object[]
So hopefully our grand-children will not have to deal with this non-sense!
Translate a type of the form From[T] to either To[T] or To[? <: T] (if wildcardArg
is set). Keep other types as they are.
from
and to
must be static classes, both with one type parameter, and the same variance.
Do the same for by name types => From[T] and => To[T]
Translate a type of the form From[T] to either To[T] or To[? <: T] (if wildcardArg
is set). Keep other types as they are.
from
and to
must be static classes, both with one type parameter, and the same variance.
Do the same for by name types => From[T] and => To[T]
If self
is a generic class, its type parameter symbols, otherwise Nil
If self
is a generic class, its type parameter symbols, otherwise Nil
The type parameters of this type are: For a ClassInfo type, the type parameters of its class. For a typeref referring to a class, the type parameters of the class. For a refinement type, the type parameters of its parent, dropping any type parameter that is-rebound by the refinement.
The type parameters of this type are: For a ClassInfo type, the type parameters of its class. For a typeref referring to a class, the type parameters of the class. For a refinement type, the type parameters of its parent, dropping any type parameter that is-rebound by the refinement.