import { ArkExport, ExportInfo, ExportType } from './ArkExport'; import { ArkClass } from './ArkClass'; import { ArkFile, Language } from './ArkFile'; import { ArkMethod } from './ArkMethod'; import { ClassSignature, NamespaceSignature } from './ArkSignature'; import { FullPosition } from '../base/Position'; import { ArkBaseModel } from './ArkBaseModel'; import { ArkError } from '../common/ArkError'; /** * @category core/model */ export declare class ArkNamespace extends ArkBaseModel implements ArkExport { private sourceCodes?; /** The full positions of this namespace (can have multiple positions for merged namespaces). */ private originFullPositions; private declaringArkFile; private declaringArkNamespace; private declaringInstance; private exportInfos; private defaultClass; private namespaces; private classes; private namespaceSignature; private anonymousClassNumber; private anonymousNamespaceNumber; constructor(); /** * Returns the program language of the file where this namespace defined. */ getLanguage(): Language; addNamespace(namespace: ArkNamespace): void; getNamespace(namespaceSignature: NamespaceSignature): ArkNamespace | null; getNamespaceWithName(namespaceName: string): ArkNamespace | null; getNamespaces(): ArkNamespace[]; setSignature(namespaceSignature: NamespaceSignature): void; getSignature(): NamespaceSignature; getNamespaceSignature(): NamespaceSignature; getName(): string; getCode(): string; /** * @deprecated Source text is now stored on ArkFile only. This method has no effect. * @param _sourceCode - The source code (ignored). */ setCode(_sourceCode: string): void; /** * Returns the source texts of this namespace extracted from the declaring ArkFile * using the namespace's origin positions. Implements lazy loading with caching. * A namespace may have multiple source segments (for merged namespaces). * @returns An array of source texts extracted from each origin position. */ getCodes(): string[]; /** * @deprecated Source text is now stored on ArkFile only. This method has no effect. * @param _sourceCodes - The source codes array (ignored). */ setCodes(_sourceCodes: string[]): void; /** * @deprecated Source text is now stored on ArkFile only. This method has no effect. * @param _sourceCode - The source code (ignored). */ addCode(_sourceCode: string): void; /** * @deprecated Use getOriginFullPositions()[0]?.getFirstLine() instead. * @returns The line number of the first namespace position. */ getLine(): number; /** * @deprecated Use setOriginFullPositions() instead. * @param line - The line number to set. */ setLine(line: number): void; /** * @deprecated Use getOriginFullPositions()[0]?.getFirstCol() instead. * @returns The column number of the first namespace position. */ getColumn(): number; /** * @deprecated Use setOriginFullPositions() instead. * @param column - The column number to set. */ setColumn(column: number): void; /** * @deprecated Use getOriginFullPositions().map() instead. * @returns The line/column pairs of all namespace positions. */ getLineColPairs(): [number, number][]; /** * @deprecated Use setOriginFullPositions() instead. * @param lineColPairs - The line/column pairs to set. */ setLineCols(lineColPairs: [number, number][]): void; /** * Returns the full positions of this namespace in the source file. * A namespace can have multiple positions when merged from multiple namespaces with the same name. * @returns An array of full positions in the source code. */ getOriginFullPositions(): FullPosition[]; /** * Sets the full positions of this namespace in the source file. * @param positions - An array of full positions in the source code to set. */ setOriginFullPositions(positions: FullPosition[]): void; getDeclaringInstance(): ArkNamespace | ArkFile; setDeclaringInstance(declaringInstance: ArkFile | ArkNamespace): void; getDeclaringArkFile(): ArkFile; setDeclaringArkFile(declaringArkFile: ArkFile): void; getDeclaringArkNamespace(): ArkNamespace | null; setDeclaringArkNamespace(declaringArkNamespace: ArkNamespace): void; getClass(classSignature: ClassSignature): ArkClass | null; getClassWithName(Class: string): ArkClass | null; getClasses(): ArkClass[]; addArkClass(arkClass: ArkClass, originName?: string): void; getExportInfos(): ExportInfo[]; getExportInfoBy(name: string): ExportInfo | undefined; addExportInfo(exportInfo: ExportInfo): void; getDefaultClass(): ArkClass; setDefaultClass(defaultClass: ArkClass): void; getAllMethodsUnderThisNamespace(): ArkMethod[]; getAllClassesUnderThisNamespace(): ArkClass[]; getAllNamespacesUnderThisNamespace(): ArkNamespace[]; getAnonymousClassNumber(): number; getAnonymousNamespaceNumber(): number; getExportType(): ExportType; removeArkClass(arkClass: ArkClass): boolean; removeNamespace(namespace: ArkNamespace): boolean; validate(): ArkError; clearAllReferences(): void; } //# sourceMappingURL=ArkNamespace.d.ts.map