AnalysisSession class

A consistent view of the results of analyzing one or more files.

The methods in this class that return analysis results will throw an InconsistentAnalysisException if the result to be returned might be inconsistent with any previously returned results.

Clients may not extend, implement or mix-in this class.

Constructors

AnalysisSession()

Properties

analysisContext AnalysisContext
The analysis context that created this session.
read-only
declaredVariables DeclaredVariables
The declared environment variables.
read-only
hashCode int
The hash code for this object. [...]
read-only, inherited
resourceProvider ResourceProvider
Return the ResourceProvider that is used to access the file system.
read-only
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
sourceFactory → SourceFactory
Return the source factory used to resolve URIs. [...]
read-only
typeProvider Future<TypeProvider>
Return a type provider that is consistent with the results returned by this session.
@Deprecated('Use LibraryElement.typeProvider'), read-only
typeSystem Future<TypeSystem>
Return the type system being used by this session.
@Deprecated('Use LibraryElement.typeSystem'), read-only
uriConverter UriConverter
Return the URI converter used to convert between URI's and file paths.
read-only

Methods

getErrors(String path) Future<ErrorsResult>
Return a future that will complete with information about the errors contained in the file with the given absolute, normalized path. [...]
getFile(String path) FileResult
Return information about the file at the given absolute, normalized path.
getLibraryByUri(String uri) Future<LibraryElement>
Return a future that will complete with the library element representing the library with the given uri.
getParsedAst(String path) Future<ParseResult>
Return a future that will complete with information about the results of parsing the file with the given absolute, normalized path. [...]
getParsedAstSync(String path) ParseResult
Return information about the results of parsing the file with the given absolute, normalized path. [...]
getParsedLibrary(String path) ParsedLibraryResult
Return information about the results of parsing units of the library file with the given absolute, normalized path. [...]
getParsedLibraryByElement(LibraryElement element) ParsedLibraryResult
Return information about the results of parsing units of the library file with the given library element. [...]
getParsedUnit(String path) ParsedUnitResult
Return information about the results of parsing the file with the given absolute, normalized path.
getResolvedAst(String path) Future<ResolveResult>
Return a future that will complete with information about the results of resolving the file with the given absolute, normalized path. [...]
getResolvedLibrary(String path) Future<ResolvedLibraryResult>
Return a future that will complete with information about the results of resolving all of the files in the library with the given absolute, normalized path. [...]
getResolvedLibraryByElement(LibraryElement element) Future<ResolvedLibraryResult>
Return a future that will complete with information about the results of resolving all of the files in the library with the library element. [...]
getResolvedUnit(String path) Future<ResolvedUnitResult>
Return a future that will complete with information about the results of resolving the file with the given absolute, normalized path.
getSourceKind(String path) Future<SourceKind>
Return a future that will complete with the source kind of the file with the given absolute, normalized path. If the path does not represent a file or if the kind of the file cannot be determined, then the future will complete with SourceKind.UNKNOWN.
getUnitElement(String path) Future<UnitElementResult>
Return a future that will complete with information about the results of building the element model for the file with the given absolute, normalizedpath.
getUnitElementSignature(String path) Future<String>
Return a future that will complete with the signature for the file with the given absolute, normalized path, or null if the file cannot be analyzed. This is the same signature returned in the result from getUnitElement. [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) bool
The equality operator. [...]
inherited