RuntimeScannerConfiguration class

Configuration controller for reflection scanning operations in JetLeaf.

This class provides fine-grained control over how reflection metadata is collected, allowing customization of scanning behavior through various flags and inclusion/exclusion lists. It's used to configure reflection operations in both development and production.

{@template scan_loader_usage}

Typical Use Cases

  • Incremental scanning during development
  • Full reloads for code generation
  • Selective scanning of specific packages/files
  • Test environment configuration

Example Configuration

final loader = RuntimeScanLoader(
  reload: true,  // Force full reload
  skipTests: true,  // Exclude test files
  packagesToScan: ['my_package', 'r:package:my_other.*'],
  filesToScan: [
    File('lib/main.dart'),
    File('lib/src/core.dart'),
  ],
  excludeClasses: [GeneratedClass],  // Skip generated code
);

{@endtemplate}

Constructors

RuntimeScannerConfiguration({bool reload = false, bool updatePackages = false, bool updateAssets = false, bool skipTests = true, List<String> packagesToScan = const [], List<String> packagesToExclude = const [], List<File> filesToScan = const [], List<File> filesToExclude = const [], List<Type> scanClasses = const [], List<Type> excludeClasses = const [], List<File> additions = const [], List<File> removals = const [], bool enableTreeShaking = false, bool writeDeclarationsToFiles = false, String outputPath = 'build/generated'})
Configuration controller for reflection scanning operations in JetLeaf.
const

Properties

additions List<File>
Files added since last scan for incremental processing.
final
enableTreeShaking bool
Whether to enable tree-shaking to only include used classes
final
excludeClasses List<Type>
Specific class types to exclude from scanning.
final
filesToExclude List<File>
Specific files to exclude from scanning.
final
filesToScan List<File>
Specific files to include in scanning.
final
hashCode int
The hash code for this object.
no setterinherited
outputPath String
Output path for generated files
final
packagesToExclude List<String>
List of package patterns to exclude from scanning.
final
packagesToScan List<String>
List of package patterns to include in scanning.
final
reload bool
When true, performs a complete reload of all reflection data.
final
removals List<File>
Files removed since last scan for cache invalidation.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scanClasses List<Type>
Specific class types to include in scanning.
final
skipTests bool
When true, excludes test files from scanning.
final
updateAssets bool
When true, updates asset metadata including non-code resources.
final
updatePackages bool
When true, updates package metadata including dependencies and exports.
final
writeDeclarationsToFiles bool
Whether to write declarations to separate files
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
Returns a string representation of the scan configuration.
override

Operators

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