Amplication AST Libraries Documentation
    Preparing search index...

    Represents a Java interface in the AST. This class handles the generation of Java interface declarations including methods, constants, and other interface-related elements.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    name: string

    The name of the interface

    packageName: string

    The package name of the interface

    access: Access

    The access level of the interface

    reference: ClassReference

    The class reference for this interface

    isNestedInterface: boolean

    Whether this is a nested interface

    extends_: ClassReference[]

    The interfaces extended by this interface

    Methods

    • Adds a method to the interface. Interface methods are implicitly public and abstract.

      Parameters

      • method: Method

        The method to add

      Returns void

    • Adds a constant to the interface. Interface constants are implicitly public static final.

      Parameters

      • constant: Field

        The field to add as a constant

      Returns void

    • Writes the interface declaration and its contents to the writer. This includes JavaDoc, annotations, methods, and constants.

      Parameters

      • writer: Writer

        The writer to write to

      Returns void

    • Returns the string representation of the AST node. This method creates a new Writer instance and writes the node's content to it.

      Returns string

      The string representation of the AST node