TypeSystem class abstract
A representation of the operations defined for the type system.
Clients may not extend, implement or mix-in this class.
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
flatten(
DartType type) → DartType -
Return the result of applying the function "flatten" to the given
type
. -
greatestLowerBound(
DartType T1, DartType T2) → DartType -
Computes the greatest lower bound of
T1
andT2
. -
instantiateInterfaceToBounds(
{required InterfaceElement element, required NullabilitySuffix nullabilitySuffix}) → InterfaceType -
Instantiate the given
element
with default type arguments. -
instantiateTypeAliasToBounds(
{required TypeAliasElement element, required NullabilitySuffix nullabilitySuffix}) → DartType -
Instantiate the given
element
with default type arguments. -
isAssignableTo(
DartType fromType, DartType toType, {bool strictCasts}) → bool -
Return
true
if thefromType
is assignable to thetoType
. Enforce strict-casts, ifstrictCasts
is set to true. -
isNonNullable(
DartType type) → bool -
Return
true
if thetype
is a non-nullable type. -
isNullable(
DartType type) → bool -
Return
true
if thetype
is a nullable type. -
isPotentiallyNonNullable(
DartType type) → bool -
Return
true
if thetype
is a potentially non-nullable type. -
isPotentiallyNullable(
DartType type) → bool -
Return
true
if thetype
is a potentially nullable type. -
isStrictlyNonNullable(
DartType type) → bool -
Return
true
if thetype
is a strictly non-nullable type. -
isSubtypeOf(
DartType leftType, DartType rightType) → bool -
Return
true
if theleftType
is a subtype of therightType
. -
leastUpperBound(
DartType T1, DartType T2) → DartType -
Computes the least upper bound of
T1
andT2
. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
promoteToNonNull(
DartType type) → DartType -
Returns a non-nullable version of
type
. This is equivalent to the operationNonNull
defined in the spec. -
resolveToBound(
DartType type) → DartType -
Return the result of resolving the bounds of the given
type
. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited