import { SparseBitVector } from '../../utils/SparseBitVector'; import { ModuleType } from '../../core/model/ArkModule'; import { ModuleDepthLevel } from './ModuleDepth'; import type { ModuleID } from '../../core/model/ArkModule'; import type { ArkModule } from '../../core/model/ArkModule'; import type { Scene } from '../../Scene'; /** * Callback invoked for each analyzed {@link ArkModule} within a {@link Scene}. */ export type ModuleAnalysisCallback = (module: ArkModule, scene: Scene) => void; /** * ModuleAnalysisConfig configures target module selection and load levels * for module-level analysis. * * Target module selection uses three dimensions combined as: * ``` * module is target ⟺ !excludedModuleIds.has(id) * && (includedTypes.has(type) || targetModuleIds.has(id)) * ``` * Priority: exclude > type filter / ID include (union). * * All three dimensions use {@link SparseBitVector} for efficient O(1) membership tests. * Bit indices are {@link ModuleID} (for ID include/exclude) or {@link ModuleType} enum values * (for type filter). * * ## Load levels ({@link ModuleDepthLevel}) * * - {@link loadLevel} applies to target modules (default {@link ModuleDepthLevel.BODIES}). * - {@link dependencyLoadLevel} applies to dependency modules — modules in the closure but * not targets (default {@link ModuleDepthLevel.SIGNATURES}). * * Only {@link ModuleDepthLevel.SIGNATURES} and {@link ModuleDepthLevel.BODIES} are valid * load targets. {@link ModuleDepthLevel.INDEX} is downgrade-only; setters throw if INDEX * is passed. * * @category core/model */ export declare class ModuleAnalysisConfig { /** Type filter: bit index = ModuleType enum value (0=PROJECT, 1=SDK, 2=OH_MODULES). */ private includedTypes; /** Explicit include IDs: bit index = ModuleID (additive to type filter). */ private targetModuleIds; /** Explicit exclude IDs: bit index = ModuleID (highest priority, overrides everything). */ private excludedModuleIds; /** Load level for target modules. Default BODIES. */ private loadLevel; /** Load level for dependency modules (in closure but not targets). Default SIGNATURES. */ private dependencyLoadLevel; constructor(); /** * Set whether all modules of the given type are included as targets. * Returns this config to allow chaining. */ setIncludeType(type: ModuleType, include: boolean): ModuleAnalysisConfig; /** Check whether modules of the given type are included by the type filter. */ isTypeIncluded(type: ModuleType): boolean; /** * Replace the current explicit include ID set with the given IDs. * Returns this config to allow chaining. */ setTargetModuleIds(ids: ModuleID[]): ModuleAnalysisConfig; /** * Add a single module ID to the explicit include set. * Returns this config to allow chaining. */ addTargetModuleId(id: ModuleID): ModuleAnalysisConfig; /** Returns the explicit include ID set as a {@link SparseBitVector} (read-only, do not modify). */ getTargetModuleIds(): SparseBitVector; /** * Replace the current explicit exclude ID set with the given IDs. * Returns this config to allow chaining. */ setExcludedModuleIds(ids: ModuleID[]): ModuleAnalysisConfig; /** * Add a single module ID to the explicit exclude set. * Excluded modules are never targets, regardless of type filter or explicit include. * Returns this config to allow chaining. */ excludeModuleId(id: ModuleID): ModuleAnalysisConfig; /** Returns the explicit exclude ID set as a {@link SparseBitVector} (read-only, do not modify). */ getExcludedModuleIds(): SparseBitVector; /** * Set the {@link ModuleDepthLevel} for target modules. * Only SIGNATURES / BODIES are valid; INDEX throws. * Returns this config to allow chaining. */ setLoadLevel(level: ModuleDepthLevel): ModuleAnalysisConfig; /** Get the {@link ModuleDepthLevel} for target modules. Default {@link ModuleDepthLevel.BODIES}. */ getLoadLevel(): ModuleDepthLevel; /** * Set the {@link ModuleDepthLevel} for dependency modules (in closure but not targets). * Only SIGNATURES / BODIES are valid; INDEX throws. * Returns this config to allow chaining. */ setDependencyLoadLevel(level: ModuleDepthLevel): ModuleAnalysisConfig; /** Get the {@link ModuleDepthLevel} for dependency modules. Default {@link ModuleDepthLevel.SIGNATURES}. */ getDependencyLoadLevel(): ModuleDepthLevel; } //# sourceMappingURL=ModuleAnalysisConfig.d.ts.map