RuntimeScanner class abstract interface

Defines the contract for a reflection scanner that processes Dart source files, extracts metadata, and optionally persists output.

Used during framework initialization or tooling that requires reflection metadata (e.g., code analyzers, documentation generators, or runtime scanners).

Implementations should handle scanning efficiently and report meaningful summaries including errors, warnings, and informational messages.

Example

final scanner = MyRuntimeScanner();
final loader = RuntimeScanLoader(
  reload: true,
  updatePackages: false,
  updateAssets: true,
  baseFilesToScan: [File('lib/main.dart')],
  packagesToScan: ['package:meta/', 'package:args/'],
);
final summary = await scanner.scan('build/meta', loader);

print(summary.getErrors());
Implementers

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
scan(String outputFolder, RuntimeScannerConfiguration loader, {Directory? source}) Future<RuntimeScannerSummary>
Defines the contract for a reflection scanner that processes Dart source files, extracts metadata, and optionally persists output.
toString() String
A string representation of this object.
inherited

Operators

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