package safeds.lang

/**
 * The annotation must target only the specified declaration types. By default, any declaration type can be targeted.
 *
 * @param targets An exhaustive list of the valid targets.
 */
@Targets([AnnotationTarget.Annotation])
annotation Targets(
    targets: List<AnnotationTarget>
)

/**
 * The declaration types that can be targeted by annotations.
 */
enum AnnotationTarget {

    /**
     * The annotation can be called on annotations.
     */
    Annotation

    /**
     * The annotation can be called on attributes.
     */
    Attribute

    /**
     * The annotation can be called on classes.
     */
    Class

    /**
     * The annotation can be called on enums.
     */
    Enum

    /**
     * The annotation can be called on enum variants.
     */
    EnumVariant

    /**
     * The annotation can be called on functions.
     */
    Function

    /**
     * The annotation can be called on modules (i.e. files).
     */
    Module

    /**
     * The annotation can be called on parameters.
     */
    Parameter

    /**
     * The annotation can be called on pipelines.
     */
    Pipeline

    /**
     * The annotation can be called on results.
     */
    Result

    /**
     * The annotation can be called on segments.
     */
    Segment

    /**
     * The annotation can be called on type parameters.
     */
    TypeParameter
}

/**
 * The annotation can be called multiple times for the same declaration.
 */
@Targets([AnnotationTarget.Annotation])
annotation Repeatable
