import { FullPosition, LineColPosition } from '../base/Position'; import { Stmt } from '../base/Stmt'; import { ArkClass } from './ArkClass'; import { FieldSignature } from './ArkSignature'; import { Type } from '../base/Type'; import { ArkBaseModel } from './ArkBaseModel'; import { ArkError } from '../common/ArkError'; import { Language } from './ArkFile'; export declare enum FieldCategory { PROPERTY_DECLARATION = 0, PROPERTY_ASSIGNMENT = 1, SHORT_HAND_PROPERTY_ASSIGNMENT = 2, SPREAD_ASSIGNMENT = 3, PROPERTY_SIGNATURE = 4, ENUM_MEMBER = 5, INDEX_SIGNATURE = 6, GET_ACCESSOR = 7, PARAMETER_PROPERTY = 8 } /** * Shift amount for field category encoding in ArkField tags field. * Uses CLASS_SPECIFIC_TAG_SHIFT as the base offset for class-specific properties. */ export declare const FIELD_CATEGORY_SHIFT = 16; /** * Mask for extracting field category from ArkField tags field. * Covers 4 bits for up to 16 field category values. */ export declare const FIELD_CATEGORY_MASK: number; /** * @category core/model */ export declare class ArkField extends ArkBaseModel { private declaringClass; private fieldSignature; /** The full position (start/end line/col) of this field in the source file. */ private originFullPosition; private sourceCode?; private initializer; constructor(); /** * Returns the program language of the file where this field's class defined. */ getLanguage(): Language; getDeclaringArkClass(): ArkClass; setDeclaringArkClass(declaringClass: ArkClass): void; /** * Returns the source text of the field extracted from the declaring ArkFile * using the field's origin position. Implements lazy loading with caching. * @returns The source text of the field, or empty string if unavailable. */ getCode(): string; /** * @deprecated Source text is now stored on ArkFile only. This method has no effect. * @param _code - The source code (ignored). */ setCode(_code: string): void; /** * Clears the cached source text, forcing re-extraction on next getCode call. */ clearSourceCode(): void; getCategory(): FieldCategory; setCategory(category: FieldCategory): void; getName(): string; getType(): Type; getSignature(): FieldSignature; setSignature(fieldSig: FieldSignature): void; /** * Returns an array of statements used for initialization. * @returns An array of statements used for initialization. */ getInitializer(): Stmt[]; setInitializer(initializer: Stmt[]): void; setQuestionToken(questionToken: boolean): void; setExclamationToken(exclamationToken: boolean): void; getQuestionToken(): boolean; getExclamationToken(): boolean; /** * @deprecated Since version 1.0.91. Use setOriginFullPosition() instead. * @param position - The LineColPosition to set. */ setOriginPosition(position: LineColPosition): void; /** * @deprecated Since version 1.0.91. Use getOriginFullPosition() instead. * @returns The original position of the field at source code. */ getOriginPosition(): LineColPosition; /** * Sets the full position of this field in the source file. * @param position - The full position in the source code to set. */ setOriginFullPosition(position: FullPosition): void; /** * Returns the full position (start/end line/col) of this field in the source file. * @returns The full position of this field in the source code. */ getOriginFullPosition(): FullPosition; validate(): ArkError; isPublic(): boolean; clearAllReferences(): void; } //# sourceMappingURL=ArkField.d.ts.map