RuleContext class abstract

Provides access to information needed by analysis rules that is not available from AST nodes or the element model.

Constructors

RuleContext()

Properties

allUnits → List<RuleContextUnit>
The list of all compilation units that make up the library under analysis, including the defining compilation unit, all parts, and all augmentations.
no setter
currentUnit → RuleContextUnit?
The compilation unit being analyzed.
no setter
definingUnit → RuleContextUnit
The defining compilation unit of the library under analysis.
no setter
hashCode → int
The hash code for this object.
no setterinherited
isInLibDir → bool
Whether the definingUnit's location is in a package's top-level 'lib' directory, including locations deeply nested, and locations in the package-implementation directory, 'lib/src'.
no setter
isInTestDirectory → bool
Whether the definingUnit is in a package's "test" directory.
no setter
libraryElement → LibraryElement?
The library element representing the library that contains the compilation unit being analyzed.
no setter
package → WorkspacePackage?
The package in which the library being analyzed lives, or null if it does not live in a package.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
typeProvider → TypeProvider
no setter
typeSystem → TypeSystem
no setter

Methods

isFeatureEnabled(Feature feature) → bool
Whether the given feature is enabled in this rule context.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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