import { AstNode } from "../core/AstNode"; import { Writer } from "../core/Writer"; import { ClassReference } from "./ClassReference"; /** * Namespace containing interfaces for Annotation configuration. */ export declare namespace Annotation { /** * Interface defining the arguments required to create a new Annotation instance. * * @interface Args */ interface Args { /** Reference to the annotation class */ reference?: ClassReference; /** Name of the annotation (alternative to providing reference) */ name?: string; /** Argument for simple annotations, like @Override */ argument?: string | AstNode; /** Named arguments for annotations with parameters, like @RequestMapping(value="/path") */ namedArguments?: Map; } } /** * Represents a Java annotation in the AST. * This class handles the generation of Java annotations including their arguments * and references to annotation classes. * * @class * @extends {AstNode} */ export declare class Annotation extends AstNode { /** The reference to the annotation class */ private reference; /** The argument for simple annotations */ private argument?; /** The named arguments for annotations with parameters */ private namedArguments?; /** * Creates a new Annotation instance with the specified configuration. * Either a reference to the annotation class or its name must be provided. * * @param {Annotation.Args} args - The arguments for creating the annotation * @throws {Error} If neither reference nor name is provided */ constructor(args: Annotation.Args); /** * Writes the annotation declaration to the writer. * This includes the annotation name, arguments, and named parameters. * * @param {Writer} writer - The writer to write to */ write(writer: Writer): void; }