InterfaceTypeImpl class
Implementation of the InterfaceType interface.
Represents class types in Dart, including core types like String, List, etc.
- Inheritance
- Implemented types
Constructors
-
InterfaceTypeImpl.new(String name, DeclarationRef declarationRef, ResolverImpl resolver, {bool isNullable = false, List<
DartType> typeArguments = const <DartType>[], InterfaceElement? element}) - Creates a new InterfaceTypeImpl with the given properties.
Properties
-
allSupertypes
→ List<
NamedDartType> -
Returns all direct and indirect supertypes of this interface type.
no setteroverride
- declarationRef → DeclarationRef
-
Reference to the declaration of this interface type.
final
- element → InterfaceElement
-
The element that declares this interface type.
no setteroverride
- hashCode → int
-
The hash code for this object.
no setteroverride
- identifier → String
-
The unique identifier for this interface type in the form
name@declarationRef.srcId
.no setteroverride -
interfaces
→ List<
NamedDartType> -
Returns the interfaces implemented by this interface type.
no setteroverride
- isClass → bool
-
Whether this type refers to a ClassElement.
no setteroverride
- isDartAsyncFuture → bool
-
Return
true
if this type represents the type '{TYPE}' defined in the dart:async library. Returntrue
if this type represents the type '{TYPE}' defined in the dart:async library.no setteroverride - isDartAsyncFutureOr → bool
-
Return
true
if this type represents the type '{TYPE}' defined in the dart:async library.no setteroverride - isDartAsyncStream → bool
-
Return
true
if this type represents the type '{TYPE}' defined in the dart:async library.no setteroverride - isDartCoreBigInt → bool
-
Return
true
if this type represents the type '{TYPE}' defined in the dart:core library.no setteroverride - isDartCoreBool → bool
-
Return
true
if this type represents the type '{TYPE}' defined in the dart:core library. Returntrue
if this type represents the type '{TYPE}' defined in the dart:core library.no setteroverride - isDartCoreDateTime → bool
-
Return
true
if this type represents the type '{TYPE}' defined in the dart:core library.no setteroverride - isDartCoreDouble → bool
-
Return
true
if this type represents the type '{TYPE}' defined in the dart:core library.no setteroverride - isDartCoreEnum → bool
-
Return
true
if this type represents the type '{TYPE}' defined in the dart:core library.no setteroverride - isDartCoreFunction → bool
-
Return
true
if this type represents the type '{TYPE}' defined in the dart:core library.no setteroverride - isDartCoreInt → bool
-
Return
true
if this type represents the type '{TYPE}' defined in the dart:core library.no setteroverride - isDartCoreIterable → bool
-
Return
true
if this type represents the type '{TYPE}' defined in the dart:core library.no setteroverride - isDartCoreList → bool
-
Return
true
if this type represents the type '{TYPE}' defined in the dart:core library.no setteroverride - isDartCoreMap → bool
-
Return
true
if this type represents the type '{TYPE}' defined in the dart:core library.no setteroverride - isDartCoreNull → bool
-
Return
true
if this type represents the type '{TYPE}' defined in the dart:core library.no setteroverride - isDartCoreNum → bool
-
Return
true
if this type represents the type '{TYPE}' defined in the dart:core library.no setteroverride - isDartCoreObject → bool
-
Return
true
if this type represents the type '{TYPE}' defined in the dart:core library.no setteroverride - isDartCoreRecord → bool
-
Return
true
if this type represents the type '{TYPE}' defined in the dart:core library.no setteroverride - isDartCoreSet → bool
-
Return
true
if this type represents the type '{TYPE}' defined in the dart:core library.no setteroverride - isDartCoreString → bool
-
Return
true
if this type represents the type '{TYPE}' defined in the dart:core library.no setteroverride - isDartCoreSymbol → bool
-
Return
true
if this type represents the type '{TYPE}' defined in the dart:core library.no setteroverride - isDartCoreType → bool
-
Return
true
if this type represents the type '{TYPE}' defined in the dart:core library.no setteroverride - isDynamic → bool
-
Return
true
if this type represents the type 'dynamic'no setterinherited - isEnum → bool
-
Whether this type refers to an EnumElement.
no setteroverride
- isInvalid → bool
-
Return
true
if this type represents the type 'Invalid'no setterinherited - isMixin → bool
-
Whether this type refers to a MixinElement.
no setteroverride
- isNever → bool
-
Return
true
if this type represents the type 'Never'no setterinherited - isNullable → bool
-
Whether this type is nullable.
finalinherited
- isValid → bool
-
Returns whether this type is valid (not an invalidType).
no setterinherited
- isVoid → bool
-
Return
true
if this type represents the type 'void'no setterinherited -
mixins
→ List<
NamedDartType> -
Returns the mixins applied to this interface type.
no setteroverride
- name → String
-
The name of this interface type.
final
- resolver → ResolverImpl
-
The resolver used to resolve this interface type.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- superType → NamedDartType?
-
Returns the super type of this interface type.
no setteroverride
-
typeArguments
→ List<
DartType> -
The type arguments applied to this interface type.
final
Methods
-
getConstructor(
String name) → ConstructorElement? -
Returns the constructor with the given
name
, or null if not found.override -
getField(
String name) → FieldElement? -
Returns the field with the given
name
, or null if not found.override -
getMethod(
String name) → MethodElement? -
Returns the method with the given
name
, or null if not found.override -
hasConstructor(
String name) → bool -
Returns true if this type has a constructor with the given
name
.override -
hasField(
String name) → bool -
Returns true if this type has a field with the given
name
.override -
hasMethod(
String name) → bool -
Returns true if this type has a method with the given
name
.override -
hasPropertyAccessor(
String name) → bool -
Returns true if this type has a property accessor with the given
name
.override -
isExactly(
DartType other) → bool -
Determines if this type is exactly the same as
other
.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
-
withNullability(
bool isNullable) → InterfaceTypeImpl -
Returns a copy of this interface type with the specified nullability.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override