A decorator that provides methods for modeling type application
Attributes
- Companion:
- object
- Graph
- Supertypes
- class AnyValtrait Matchableclass Any
Members list
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]
.
Attributes
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
Attributes
The type representing
The type representing
T[U1, ..., Un]
where
Attributes
- 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.
Attributes
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.
Attributes
Argument types where existential types in arguments are disallowed
Argument types where existential types in arguments are disallowed
Attributes
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
Attributes
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
Attributes
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
Attributes
The element type of a sequence or array
The element type of a sequence or array
Attributes
If self is not lambda-bound, eta expand it.
If self is not lambda-bound, eta expand it.
Attributes
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.
Attributes
Is self type of kind "*"?
Is self type of kind "*"?
Attributes
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.
Attributes
If self
is a higher-kinded type, its type parameters, otherwise Nil
If self
is a higher-kinded type, its type parameters, otherwise Nil
Attributes
Is self type bounded by a type lambda or AnyKind?
Is self type bounded by a type lambda or AnyKind?
Attributes
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
.
Attributes
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
Attributes
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
Attributes
The top type with the same kind as self
. This is largest type capturing
the parameter shape of a type without looking at precise bounds.
The top type with the same kind as self
. This is largest type capturing
the parameter shape of a type without looking at precise bounds.
- The top-type of simple-kinded types is Any
- A kind like (* -> *) -> * is represented by the top type [X1 <: [X2] =>> Any] =>> Any
Attributes
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.
Attributes
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!
Attributes
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]
Attributes
Translate a From[T]
into a *T
.
Translate a From[T]
into a *T
.
Attributes
If self
is a generic class, its type parameter symbols, otherwise Nil
If self
is a generic class, its type parameter symbols, otherwise Nil
Attributes
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.