Resolver class abstract
Abstract interface for resolving Dart elements and types.
The Resolver is responsible for turning source code into element models, resolving types, and providing access to the type system. It manages the relationship between assets, libraries, and elements.
Constructors
Properties
- fileResolver → PackageFileResolver
-
The file resolver used to map between file paths and URIs.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
allSupertypesOf(
InterfaceElement element) → List< InterfaceType> - Gets all supertypes of an interface element.
-
elementOf(
DartType type) → Element? - Gets the element represented by a type.
-
getDeclarationRef(
String identifier, Asset importingSrc, {String? importPrefix}) → DeclarationRef? - Gets a declaration reference for an identifier in an importing source.
-
getNamedType(
String name, String packageUrl) → NamedDartType - Gets a named type reference from a name and package URL.
-
invalidateAssetCache(
Asset src) → void - Invalidates any cached information for the given asset.
-
isLibrary(
Asset asset) → bool - Checks if an asset represents a Dart library.
-
libraryFor(
Asset src, {bool allowSyntaxErrors = false}) → LibraryElementImpl - Gets the library element for the given asset.
-
libraryForDirective(
DirectiveElement directive) → LibraryElement - Gets the library element for a directive element.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
resolveConstructors(
InterfaceElement elem) → void - Resolves the constructors of an interface element.
-
resolveFields(
InterfaceElement elem) → void - Resolves the fields of an interface element.
-
resolveLibrary(
Asset src, {bool preResolveTopLevelMetadata = false, bool allowSyntaxErrors = false}) → LibraryElement - Resolves a library and its top-level elements.
-
resolveMethods(
InterfaceElement elem, {ElementPredicate< MethodDeclaration> ? predicate}) → void - Resolves the methods of an interface element.
-
toString(
) → String -
A string representation of this object.
inherited
-
typeCheckerFor(
String name, String packageImport) → TypeChecker - Creates a type checker for a type identified by name and package.
-
typeCheckerOf<
T> () → TypeChecker - Creates a type checker for the given type.
-
uriForAsset(
String id) → Uri - Gets the URI for an asset by its ID.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited