StringExtractorFactory class

Factory class for managing string extraction.

Provides a centralized interface for REGEX-based string extraction. Handles initialization and caching for efficient extraction.

Usage:

// Initialize the extractor
await StringExtractorFactory.initializeML();

// Extract strings from source code
final strings = await StringExtractorFactory.extractStrings(sourceCode);

Constructors

StringExtractorFactory()

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
toString() String
A string representation of this object.
inherited

Operators

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

Static Properties

disableML bool
Global toggle to disable heavy ML initialization during tests or CI. When true, the factory will skip ML initialization and only use AST and fallback regex extractors for faster and deterministic behavior.
getter/setter pair
isMLInitialized bool
Check if the extractor is available and initialized
no setter

Static Methods

dispose() → void
Dispose of resources
extractStrings(String sourceCode) Future<List<String>>
Extract strings using REGEX-based approach.
initializeML() Future<void>
Initialize the string extractor.