ASTTypeMap<TK extends ASTType<K>, TV extends ASTType<V>, K, V> class

ASTType for an array/List.

Inheritance

Constructors

ASTTypeMap(TK keyType, TV valueType)

Properties

annotations → List<ASTAnnotation>?
finalinherited
children → Iterable<ASTNode>
The children nodes of this node.
no setteroverride
descendantChildren → List<ASTNode>
Return the children and it's descendant children (unmodifiable).
no setterinherited
generics → List<ASTType>?
finalinherited
hasGenerics → bool
Returns true if this type has generics.
no setterinherited
hashCode → int
The hash code for this object.
no setterinherited
hasSuperType → bool
Returns true if this type has a super type.
no setterinherited
isNullable → bool
Whether this type is nullable (alias for nullable).
no setterinherited
keyType → TK
final
name → String
finalinherited
nullable ↔ bool
Whether this type is nullable (the Dart ? suffix, e.g. String?).
getter/setter pairinherited
parentNode → ASTNode?
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
superType → ASTType?
finalinherited
valueType → TV
final

Methods

acceptsAssignment(ASTType type) → bool
Whether a value of type can be assigned to a slot of this type, accounting for nullability:
inherited
acceptsType(ASTType type) → bool
Will return true if type can be cast to this type. Note: This is similar to Java isInstance and isAssignableFrom.
override
asNullable([bool nullable = true]) → ASTType<Map<K, V>>
Returns a version of this type with the given nullable flag.
inherited
associateToType(ASTTypedNode node) → void
inherited
cacheDescendantChildren() → void
Mark that this node can cache its descendantChildren.
inherited
callCasted<R>(R call<T>()) → R
inherited
canCastToType(ASTType type) → bool
Return true if this can be cast to type;
inherited
cloneType() → ASTType
Returns a fresh, non-interned copy of this concrete type (with nullable reset to false). Subclasses override to preserve their concrete class so that structural dispatch (is ASTTypeArray, etc.) and typed value conversion keep working on nullable variants.
override
commonType(ASTType? other) → ASTType?
inherited
getClass() → ASTClass<Map<K, V>>
inherited
getNodeIdentifier(String name, {ASTNode? requester}) → ASTNode?
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
resolveNode(ASTNode? parentNode) → void
inherited
resolveRuntimeType(VMContext context, ASTNode? node) → FutureOr<ASTType>
inherited
resolveType(VMContext? context) → FutureOr<ASTType>
inherited
setClass(ASTClass<Map<K, V>> clazz) → void
inherited
toASTValue(Object? value) → ASTValueMap<TK, TV, K, V>?
override
toDefaultValue(VMContext context) → FutureOr<ASTValue<Map<K, V>>?>
inherited
toString() → String
A string representation of this object.
inherited
toValue(VMContext context, Object? v) → FutureOr<ASTValue<Map<K, V>>?>
override
withoutNullability() → ASTType<Map<K, V>>
Returns the non-nullable form of this type.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

fromType(Type type) → ASTTypeMap<ASTType, ASTType, dynamic, dynamic>?
override